aboutsummaryrefslogtreecommitdiff
path: root/libretro.c
diff options
context:
space:
mode:
authormeepingsnesroms2016-10-16 10:52:04 -0700
committermeepingsnesroms2016-10-16 10:52:04 -0700
commite0fea5a2814b07b527ce2cf7201437a00750b676 (patch)
tree33ecf21f351e7c141479a10059b0ef74ed7395d1 /libretro.c
parent79d2a4b7be2264d3cdba4d4e2501851563b0eddb (diff)
downloadsnes9x2005-e0fea5a2814b07b527ce2cf7201437a00750b676.tar.gz
snes9x2005-e0fea5a2814b07b527ce2cf7201437a00750b676.tar.bz2
snes9x2005-e0fea5a2814b07b527ce2cf7201437a00750b676.zip
The popping should now be fixed!(If using blare apu)
Diffstat (limited to 'libretro.c')
-rw-r--r--libretro.c12
1 files changed, 10 insertions, 2 deletions
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,