X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fpsp%2Fmp3.c;h=18624399556c9159423bc2f6ac3db173578d73bd;hb=6311a3baf533d4a034e51dfe38e8cb213a1bf442;hp=4ea3bdd7f6c5e5543420ff7cdeeab5ca935ec728;hpb=93f9619ed819dee07948416c98ca2f1c70a22666;p=picodrive.git diff --git a/platform/psp/mp3.c b/platform/psp/mp3.c index 4ea3bdd..1862439 100644 --- a/platform/psp/mp3.c +++ b/platform/psp/mp3.c @@ -403,8 +403,8 @@ void mp3_update(int *buffer, int length, int stereo) if (mp3_handle < 0 || mp3_src_pos >= mp3_src_size) return; length_mp3 = length; - if (PsndRate == 22050) length_mp3 <<= 1; // mp3s are locked to 44100Hz stereo - else if (PsndRate == 11025) length_mp3 <<= 2; // so make length 44100ish + if (PicoIn.sndRate == 22050) length_mp3 <<= 1; // mp3s are locked to 44100Hz stereo + else if (PicoIn.sndRate == 11025) length_mp3 <<= 2; // so make length 44100ish /* do we have to wait? */ if (mp3_job_started && mp3_samples_ready < length_mp3) @@ -420,8 +420,8 @@ void mp3_update(int *buffer, int length, int stereo) { int shr = 0; void (*mix_samples)(int *dest_buf, short *mp3_buf, int count) = mix_16h_to_32; - if (PsndRate == 22050) { mix_samples = mix_16h_to_32_s1; shr = 1; } - else if (PsndRate == 11025) { mix_samples = mix_16h_to_32_s2; shr = 2; } + if (PicoIn.sndRate == 22050) { mix_samples = mix_16h_to_32_s1; shr = 1; } + else if (PicoIn.sndRate == 11025) { mix_samples = mix_16h_to_32_s2; shr = 2; } if (1152 - mp3_buffer_offs >= length_mp3) { mix_samples(buffer, mp3_mix_buffer[mp3_play_bufsel] + mp3_buffer_offs*2, length<<1);