X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=pico%2Fsound%2Fsound.c;h=6e0db26ca7ccd700a11ebc0c9e4ca3953bd7b37d;hb=000f53350cb0d6540310d8c4b02eb034c9662f0d;hp=a7510db457f3e8811f8e819a47ed294443d809be;hpb=19954be1966a04304b16d9180b003ec8ca3bc532;p=picodrive.git diff --git a/pico/sound/sound.c b/pico/sound/sound.c index a7510db..6e0db26 100644 --- a/pico/sound/sound.c +++ b/pico/sound/sound.c @@ -107,14 +107,9 @@ static void dac_recalculate(void) PICO_INTERNAL void PsndReset(void) { - void *ym2612_regs; - - // also clear the internal registers+addr line - ym2612_regs = YM2612GetRegs(); - memset(ym2612_regs, 0, 0x200+4); - timers_reset(); - + // PsndRerate calls YM2612Init, which also resets PsndRerate(0); + timers_reset(); } @@ -416,8 +411,8 @@ PICO_INTERNAL void PsndGetSamplesMS(void) // upmix to "stereo" if needed if (stereo) { - int i = length, *p = (void *)PsndOut; - while (i--) + int i, *p; + for (i = length, p = (void *)PsndOut; i > 0; i--, p++) *p |= *p << 16; }