psp, revisit audio handling

sound rates 44100, 22050, 11025 Hz, internally upsampled
conversion to stereo since mono isn't supported well on psp
This commit is contained in:
kub 2024-02-22 20:51:08 +01:00
parent d12dd1b4ea
commit e28fd20f08
3 changed files with 138 additions and 79 deletions

View file

@ -1349,15 +1349,16 @@ void emu_sound_start(void)
{
int is_stereo = (PicoIn.opt & POPT_EN_STEREO) ? 1 : 0;
memset(sndBuffer, 0, sizeof(sndBuffer));
PicoIn.sndOut = sndBuffer;
PsndRerate(Pico.m.frame_count ? 1 : 0);
printf("starting audio: %i len: %i stereo: %i, pal: %i\n",
PicoIn.sndRate, Pico.snd.len, is_stereo, Pico.m.pal);
sndout_start(PicoIn.sndRate, is_stereo);
PicoIn.writeSound = snd_write_nonblocking;
plat_update_volume(0, 0);
memset(sndBuffer, 0, sizeof(sndBuffer));
PicoIn.sndOut = sndBuffer;
}
}