3DS, Wii: Tweak audio rates a bit
Jeffrey Pfau jeffrey@endrift.com
Thu, 03 Sep 2015 22:40:02 -0700
2 files changed,
6 insertions(+),
6 deletions(-)
M
src/platform/3ds/main.c
→
src/platform/3ds/main.c
@@ -83,16 +83,16 @@ HIDUSER_EnableGyroscope();
} #if RESAMPLE_LIBRARY == RESAMPLE_BLIP_BUF - double ratio = GBAAudioCalculateRatio(1, 59.826, 1); - blip_set_rates(runner->context.gba->audio.left, GBA_ARM7TDMI_FREQUENCY, 44100 * ratio); - blip_set_rates(runner->context.gba->audio.right, GBA_ARM7TDMI_FREQUENCY, 44100 * ratio); + double ratio = GBAAudioCalculateRatio(1, 59.8260982880808, 1); + blip_set_rates(runner->context.gba->audio.left, GBA_ARM7TDMI_FREQUENCY, 32768 * ratio); + blip_set_rates(runner->context.gba->audio.right, GBA_ARM7TDMI_FREQUENCY, 32768 * ratio); #endif if (hasSound) { memset(audioLeft, 0, AUDIO_SAMPLE_BUFFER * sizeof(int16_t)); memset(audioRight, 0, AUDIO_SAMPLE_BUFFER * sizeof(int16_t)); audioPos = 0; - csndPlaySound(0x8, SOUND_REPEAT | SOUND_FORMAT_16BIT, 44100, 1.0, -1.0, audioLeft, audioLeft, AUDIO_SAMPLE_BUFFER * sizeof(int16_t)); - csndPlaySound(0x9, SOUND_REPEAT | SOUND_FORMAT_16BIT, 44100, 1.0, 1.0, audioRight, audioRight, AUDIO_SAMPLE_BUFFER * sizeof(int16_t)); + csndPlaySound(0x8, SOUND_REPEAT | SOUND_FORMAT_16BIT, 32768, 1.0, -1.0, audioLeft, audioLeft, AUDIO_SAMPLE_BUFFER * sizeof(int16_t)); + csndPlaySound(0x9, SOUND_REPEAT | SOUND_FORMAT_16BIT, 32768, 1.0, 1.0, audioRight, audioRight, AUDIO_SAMPLE_BUFFER * sizeof(int16_t)); } }
M
src/platform/wii/main.c
→
src/platform/wii/main.c
@@ -312,7 +312,7 @@
GBAAudioResizeBuffer(&runner->context.gba->audio, SAMPLES); #if RESAMPLE_LIBRARY == RESAMPLE_BLIP_BUF - double ratio = GBAAudioCalculateRatio(1, 60, 1); + double ratio = GBAAudioCalculateRatio(1, 60 / 1.001, 1); blip_set_rates(runner->context.gba->audio.left, GBA_ARM7TDMI_FREQUENCY, 48000 * ratio); blip_set_rates(runner->context.gba->audio.right, GBA_ARM7TDMI_FREQUENCY, 48000 * ratio); #endif