From b97758ef46e4ae6391eb94c09cd0df234ed5cf27 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 28 Nov 2018 00:13:04 -0800 Subject: [PATCH] Switch to libsoundio on Linux now that PA works reliably after d1fe7520282c212dfdb156fef37555c4ab006787 --- app/app.pro | 2 +- .../audio/renderers/soundioaudiorenderer.cpp | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/app.pro b/app/app.pro index b82ce528..70df8caf 100644 --- a/app/app.pro +++ b/app/app.pro @@ -54,7 +54,7 @@ macx { } unix:!macx { - CONFIG += link_pkgconfig + CONFIG += link_pkgconfig soundio PKGCONFIG += openssl sdl2 opus # For libsoundio diff --git a/app/streaming/audio/renderers/soundioaudiorenderer.cpp b/app/streaming/audio/renderers/soundioaudiorenderer.cpp index bf3339ee..2e83df08 100644 --- a/app/streaming/audio/renderers/soundioaudiorenderer.cpp +++ b/app/streaming/audio/renderers/soundioaudiorenderer.cpp @@ -341,11 +341,12 @@ void SoundIoAudioRenderer::sioWriteCallback(SoundIoOutStream* stream, int frameC // Place an upper-bound on audio stream latency to // avoid accumulating packets in queue-based backends - // like WASAPI. This bound was set by testing on several - // Windows machines. The highest latency was found on - // a XPS 9343 running Windows 7 in Steam Big Picture - // and the 5.1 audio test clip from Fraunhofer. - if (me->m_SoundIo->current_backend == SoundIoBackendWasapi) { + // like WASAPI, ALSA, and PulseAudio. + // + // This bound was set by testing on several Windows machines. + // The highest latency was found on a XPS 9343 running Windows 7 + // in Steam Big Picture and the 5.1 audio test clip from Fraunhofer. + if (me->m_SoundIo->current_backend != SoundIoBackendCoreAudio && me->m_SoundIo->current_backend != SoundIoBackendJack) { double latency; if (soundio_outstream_get_latency(stream, &latency) == SoundIoErrorNone) { if (latency > 0.050) {