X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2Fsound%2Fsound.c;h=cc36a449a753bdef6ccc875ecc868a0766cfc040;hb=3d48f1437fc5e2c556ed900ae25fd4a255d52922;hp=a9f2f68b761eced584aa0f675ff60ba71568c9a8;hpb=abe0ea43b561e2def84cf921b1d6d8c82819ea69;p=picodrive.git diff --git a/Pico/sound/sound.c b/Pico/sound/sound.c index a9f2f68..cc36a44 100644 --- a/Pico/sound/sound.c +++ b/Pico/sound/sound.c @@ -227,6 +227,7 @@ void sound_clear(void) int sound_render(int offset, int length) { + int buf32_updated = 0; int *buf32 = PsndBuffer+offset; int stereo = (PicoOpt & 8) >> 3; // emulating CD && PCM option enabled && PCM chip on && have enabled channels @@ -247,12 +248,18 @@ int sound_render(int offset, int length) SN76496Update(PsndOut+offset, length, stereo); // Add in the stereo FM buffer - if (PicoOpt & 1) - YM2612UpdateOne(buf32, length, stereo, 1); + if (PicoOpt & 1) { + buf32_updated = YM2612UpdateOne(buf32, length, stereo, 1); + } else + memset32(buf32, 0, length<