SDL: Add a small bit of allowable extra audio buffering
This commit is contained in:
parent
056f53ff4a
commit
2c71435c43
@ -109,7 +109,7 @@ static void _mSDLAudioCallback(void* context, Uint8* data, int len) {
|
|||||||
fauxClock = mCoreCalculateFramerateRatio(audioContext->core, audioContext->sync->fpsTarget);
|
fauxClock = mCoreCalculateFramerateRatio(audioContext->core, audioContext->sync->fpsTarget);
|
||||||
}
|
}
|
||||||
mCoreSyncLockAudio(audioContext->sync);
|
mCoreSyncLockAudio(audioContext->sync);
|
||||||
audioContext->sync->audioHighWater = audioContext->samples + audioContext->resampler.highWaterMark + audioContext->resampler.lowWaterMark;
|
audioContext->sync->audioHighWater = audioContext->samples + audioContext->resampler.highWaterMark + audioContext->resampler.lowWaterMark + (audioContext->samples >> 6);
|
||||||
audioContext->sync->audioHighWater *= sampleRate / (fauxClock * audioContext->obtainedSpec.freq);
|
audioContext->sync->audioHighWater *= sampleRate / (fauxClock * audioContext->obtainedSpec.freq);
|
||||||
}
|
}
|
||||||
mAudioResamplerSetSource(&audioContext->resampler, buffer, sampleRate / fauxClock, true);
|
mAudioResamplerSetSource(&audioContext->resampler, buffer, sampleRate / fauxClock, true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user