mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-12-26 19:21:50 +01:00
Snes9x - Revert to higher APU clock. (#841)
This commit is contained in:
parent
daba8fcdae
commit
c6b0535999
@ -15,10 +15,10 @@
|
|||||||
#define APU_DEFAULT_INPUT_RATE 32040
|
#define APU_DEFAULT_INPUT_RATE 32040
|
||||||
#define APU_MINIMUM_SAMPLE_COUNT 512
|
#define APU_MINIMUM_SAMPLE_COUNT 512
|
||||||
#define APU_MINIMUM_SAMPLE_BLOCK 128
|
#define APU_MINIMUM_SAMPLE_BLOCK 128
|
||||||
#define APU_NUMERATOR_NTSC 5632
|
#define APU_NUMERATOR_NTSC 15664
|
||||||
#define APU_DENOMINATOR_NTSC 118125
|
#define APU_DENOMINATOR_NTSC 328125
|
||||||
#define APU_NUMERATOR_PAL 35527
|
#define APU_NUMERATOR_PAL 34176
|
||||||
#define APU_DENOMINATOR_PAL 738343
|
#define APU_DENOMINATOR_PAL 709379
|
||||||
|
|
||||||
SNES_SPC *spc_core = NULL;
|
SNES_SPC *spc_core = NULL;
|
||||||
|
|
||||||
@ -314,7 +314,7 @@ void UpdatePlaybackRate (void)
|
|||||||
|
|
||||||
if (Settings.MSU1)
|
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);
|
msu::resampler->time_ratio(time_ratio);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ void S9xMSU1Generate(size_t sample_count)
|
|||||||
{
|
{
|
||||||
partial_frames += 4410 * (sample_count / 2);
|
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)
|
if (MSU1.MSU1_STATUS & AudioPlaying && audioStream)
|
||||||
{
|
{
|
||||||
@ -255,7 +255,7 @@ void S9xMSU1Generate(size_t sample_count)
|
|||||||
*(bufPos++) = *left;
|
*(bufPos++) = *left;
|
||||||
*(bufPos++) = *right;
|
*(bufPos++) = *right;
|
||||||
MSU1.MSU1_AUDIO_POS += 4;
|
MSU1.MSU1_AUDIO_POS += 4;
|
||||||
partial_frames -= 3200;
|
partial_frames -= 3204;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (bytes_read >= 0)
|
if (bytes_read >= 0)
|
||||||
@ -279,7 +279,7 @@ void S9xMSU1Generate(size_t sample_count)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
MSU1.MSU1_STATUS &= ~(AudioPlaying | AudioRepeating);
|
MSU1.MSU1_STATUS &= ~(AudioPlaying | AudioRepeating);
|
||||||
partial_frames -= 3200;
|
partial_frames -= 3204;
|
||||||
*(bufPos++) = 0;
|
*(bufPos++) = 0;
|
||||||
*(bufPos++) = 0;
|
*(bufPos++) = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user