X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=pico%2Fsound%2Fsound.c;h=5a9b8b3399557e76f2bfa651987ae673a5defd00;hb=f4bb5d6b2c96a94317c4edb7805eb6d6ed8589ef;hp=6e0db26ca7ccd700a11ebc0c9e4ca3953bd7b37d;hpb=af37bca858874b5cbd5ab126eaba1fad6ff7ab72;p=picodrive.git diff --git a/pico/sound/sound.c b/pico/sound/sound.c index 6e0db26..5a9b8b3 100644 --- a/pico/sound/sound.c +++ b/pico/sound/sound.c @@ -247,7 +247,7 @@ PICO_INTERNAL void cdda_start_play(void) lba_offset += Pico_mcd->TOC.Tracks[index].Offset; // find the actual file for this track - for (i = index; i >= 0; i--) + for (i = index; i > 0; i--) if (Pico_mcd->TOC.Tracks[i].F != NULL) break; if (Pico_mcd->TOC.Tracks[i].F == NULL) { @@ -356,6 +356,9 @@ static int PsndRender(int offset, int length) cdda_raw_update(buf32, length); } + if ((PicoAHW & PAHW_32X) && (PicoOpt & POPT_EN_PWM)) + p32x_pwm_update(buf32, length, stereo); + // convert + limit to normal 16bit output PsndMix_32_to_16l(PsndOut+offset, buf32, length);