SDL: Fix audio sync

This commit is contained in:
Jeffrey Pfau 2016-02-07 12:06:13 -08:00
parent 1c6b98a2b4
commit 2e0ee682a5
1 changed files with 3 additions and 1 deletions

View File

@ -110,7 +110,9 @@ static void _mSDLAudioCallback(void* context, Uint8* data, int len) {
double fauxClock = 1;
if (audioContext->thread) {
fauxClock = GBAAudioCalculateRatio(1, audioContext->thread->fpsTarget, 1);
mCoreSyncLockAudio(&audioContext->thread->sync);
}
if (audioContext->sync) {
mCoreSyncLockAudio(audioContext->sync);
}
blip_set_rates(left, clockRate, audioContext->obtainedSpec.freq * fauxClock);
blip_set_rates(right, clockRate, audioContext->obtainedSpec.freq * fauxClock);