From 368aaa4a10c76a8d5ce31e8656bcfc7333170bbc Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Thu, 9 Mar 2023 10:31:06 +1100 Subject: [PATCH] filling buffer at the end of process_audio fixes it lol --- gb-vst/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gb-vst/src/lib.rs b/gb-vst/src/lib.rs index cc194b8..ff79065 100644 --- a/gb-vst/src/lib.rs +++ b/gb-vst/src/lib.rs @@ -32,7 +32,7 @@ pub struct GameboyEmu { type FrameReceiver = Mutex>>>; type JoypadSender = Mutex>>; -const FRAMES_TO_BUFFER: usize = 3; +const FRAMES_TO_BUFFER: usize = 1; impl Plugin for GameboyEmu { const NAME: &'static str = "Gameboy"; @@ -86,6 +86,7 @@ impl Plugin for GameboyEmu { } } } + vars.emulator_core.run_until_buffer_full(); } ProcessStatus::KeepAlive }