sound, add native rate mode, change resampling

This commit is contained in:
kub 2022-03-06 20:40:50 +00:00
parent d26d4c2965
commit 882f697ad4
11 changed files with 90 additions and 167 deletions

View file

@ -57,7 +57,7 @@ int pico_inp_mode;
int flip_after_sync;
int engineState = PGS_Menu;
static short __attribute__((aligned(4))) sndBuffer[2*44100/50];
static short __attribute__((aligned(4))) sndBuffer[2*53267/50];
/* tmp buff to reduce stack usage for plats with small stack */
static char static_buff[512];
@ -1328,6 +1328,9 @@ void emu_sound_start(void)
{
PicoIn.sndOut = NULL;
// auto-select rate?
if (PicoIn.sndRate > 52000)
PicoIn.sndRate = YM2612_NATIVE_RATE();
if (currentConfig.EmuOpt & EOPT_EN_SOUND)
{
int is_stereo = (PicoIn.opt & POPT_EN_STEREO) ? 1 : 0;