From e0fea5a2814b07b527ce2cf7201437a00750b676 Mon Sep 17 00:00:00 2001 From: meepingsnesroms Date: Sun, 16 Oct 2016 10:52:04 -0700 Subject: The popping should now be fixed!(If using blare apu) --- libretro.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'libretro.c') diff --git a/libretro.c b/libretro.c index 03f2ee3..16f9cf2 100644 --- a/libretro.c +++ b/libretro.c @@ -397,7 +397,7 @@ static void S9xAudioCallback() { size_t avail; /* Just pick a big buffer. We won't use it all. */ - static int16_t audio_buf[0x10000]; + static int16_t audio_buf[0x20000]; S9xFinalizeSamples(); avail = S9xGetSampleCount(); @@ -432,7 +432,15 @@ void retro_init(void) S9xInitDisplay(); S9xInitGFX(); #ifdef USE_BLARGG_APU - S9xInitSound(16, 0); + //very slow devices will still pop + + //this needs to be applied to all snes9x cores + + //increasing the buffer size does not cause extra lag(tested with 1000ms buffer) + //bool8 S9xInitSound (int buffer_ms, int lag_ms) + + S9xInitSound(1000, 0);//just give it a 1 second buffer + S9xSetSamplesAvailableCallback(S9xAudioCallback); #else S9xInitSound(Settings.SoundPlaybackRate, -- cgit v1.2.3