Snes9x - Revert to higher APU clock. (#841)

This commit is contained in:
bladeoner 2019-04-12 21:24:23 +02:00 committed by dborth
parent daba8fcdae
commit c6b0535999
2 changed files with 8 additions and 8 deletions

View File

@ -15,10 +15,10 @@
#define APU_DEFAULT_INPUT_RATE 32040
#define APU_MINIMUM_SAMPLE_COUNT 512
#define APU_MINIMUM_SAMPLE_BLOCK 128
#define APU_NUMERATOR_NTSC 5632
#define APU_DENOMINATOR_NTSC 118125
#define APU_NUMERATOR_PAL 35527
#define APU_DENOMINATOR_PAL 738343
#define APU_NUMERATOR_NTSC 15664
#define APU_DENOMINATOR_NTSC 328125
#define APU_NUMERATOR_PAL 34176
#define APU_DENOMINATOR_PAL 709379
SNES_SPC *spc_core = NULL;
@ -314,7 +314,7 @@ void UpdatePlaybackRate (void)
if (Settings.MSU1)
{
time_ratio = (44100.0 / Settings.SoundPlaybackRate) * (Settings.SoundInputRate / 32000.0);
time_ratio = (44100.0 / Settings.SoundPlaybackRate) * (Settings.SoundInputRate / 32040.0);
msu::resampler->time_ratio(time_ratio);
}
}

View File

@ -237,7 +237,7 @@ void S9xMSU1Generate(size_t sample_count)
{
partial_frames += 4410 * (sample_count / 2);
while ((bufPos < (bufEnd - 2)) && partial_frames >= 3200)
while ((bufPos < (bufEnd - 2)) && partial_frames >= 3204)
{
if (MSU1.MSU1_STATUS & AudioPlaying && audioStream)
{
@ -255,7 +255,7 @@ void S9xMSU1Generate(size_t sample_count)
*(bufPos++) = *left;
*(bufPos++) = *right;
MSU1.MSU1_AUDIO_POS += 4;
partial_frames -= 3200;
partial_frames -= 3204;
}
else
if (bytes_read >= 0)
@ -279,7 +279,7 @@ void S9xMSU1Generate(size_t sample_count)
else
{
MSU1.MSU1_STATUS &= ~(AudioPlaying | AudioRepeating);
partial_frames -= 3200;
partial_frames -= 3204;
*(bufPos++) = 0;
*(bufPos++) = 0;
}