Cap queued audio at 40 ms on Steam Link

This commit is contained in:
Cameron Gutman
2019-05-11 19:09:59 -07:00
parent c2b12868bb
commit b3ee7a635f
7 changed files with 58 additions and 15 deletions
+5
View File
@@ -87,6 +87,11 @@ void* SdlAudioRenderer::getAudioBuffer(int*)
bool SdlAudioRenderer::submitAudio(int bytesWritten)
{
if (bytesWritten == 0) {
// Nothing to do
return true;
}
if (SDL_QueueAudio(m_AudioDevice, m_AudioBuffer, bytesWritten) < 0) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
"Failed to queue audio sample: %s",