SDL: Fix GB audio speed

This commit is contained in:
Vicki Pfau 2024-04-16 22:38:49 -07:00
parent 7b2edbd1bd
commit 5d92c3ca0a
1 changed files with 2 additions and 1 deletions

View File

@ -99,8 +99,9 @@ static void _mSDLAudioCallback(void* context, Uint8* data, int len) {
}
blip_t* left = NULL;
blip_t* right = NULL;
int32_t clockRate = GBA_ARM7TDMI_FREQUENCY;
int32_t clockRate = 1;
if (audioContext->core) {
clockRate = audioContext->core->frequency(audioContext->core);
left = audioContext->core->getAudioChannel(audioContext->core, 0);
right = audioContext->core->getAudioChannel(audioContext->core, 1);
}