mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
GP2X: low volume and fast forward
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@310 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
53668ca0f8
commit
4a32f01f55
9 changed files with 186 additions and 40 deletions
|
@ -15,6 +15,8 @@
|
|||
#include "../cd/pcm.h"
|
||||
#include "mix.h"
|
||||
|
||||
void (*PsndMix_32_to_16l)(short *dest, int *src, int count) = mix_32_to_16l_stereo;
|
||||
|
||||
// master int buffer to mix to
|
||||
static int PsndBuffer[2*44100/50];
|
||||
|
||||
|
@ -151,6 +153,9 @@ void PsndRerate(int preserve_state)
|
|||
memset32(PsndBuffer, 0, sizeof(PsndBuffer)/4);
|
||||
if (PsndOut)
|
||||
PsndClear();
|
||||
|
||||
// set mixer
|
||||
PsndMix_32_to_16l = (PicoOpt & 8) ? mix_32_to_16l_stereo : mix_32_to_16_mono;
|
||||
}
|
||||
|
||||
|
||||
|
@ -260,9 +265,7 @@ PICO_INTERNAL int PsndRender(int offset, int length)
|
|||
mp3_update(buf32, length, stereo);
|
||||
|
||||
// convert + limit to normal 16bit output
|
||||
if (stereo)
|
||||
mix_32_to_16l_stereo(PsndOut+offset, buf32, length);
|
||||
else mix_32_to_16_mono (PsndOut+offset, buf32, length);
|
||||
PsndMix_32_to_16l(PsndOut+offset, buf32, length);
|
||||
|
||||
return length;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue