X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2Fsound%2Fsound.c;h=cc36a449a753bdef6ccc875ecc868a0766cfc040;hb=3d48f1437fc5e2c556ed900ae25fd4a255d52922;hp=18cc46eada9500a35a74a5c5b7c78112b676fbb9;hpb=7a93adeb29f01f5867ff36606cd73a382b6ee0e3;p=picodrive.git diff --git a/Pico/sound/sound.c b/Pico/sound/sound.c index 18cc46e..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,16 +248,22 @@ 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<