summaryrefslogtreecommitdiff
path: root/src/Instance.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-02-16 22:38:55 +0100
committerMax Kellermann <max@musicpd.org>2018-02-16 22:38:55 +0100
commitd29d186d623441b014e691310face12cbef762a8 (patch)
tree0a1bf0ad023dd76fa12b7bcce203eab240cfd1f3 /src/Instance.cxx
parent61f2ce67ddcd3d1e1f99395dee54c813b5ea9519 (diff)
output/alsa: use a new I/O thread with real-time scheduling
The normal I/O event thread can have a large latency, e.g. when libgnutls loads all TLS CA certificates for a https connect. This makes it unreliable for the ALSA I/O notifications, and causes ring buffer xruns. To avoid interfering with high latency events such as CURL's, we move the ALSA I/O events to a separate I/O thread which also obtains real-time scheduling (if possible). Closes #221
Diffstat (limited to 'src/Instance.cxx')
-rw-r--r--src/Instance.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Instance.cxx b/src/Instance.cxx
index 2c27b7938..b3595e995 100644
--- a/src/Instance.cxx
+++ b/src/Instance.cxx
@@ -40,7 +40,8 @@
#include <exception>
Instance::Instance()
- :idle_monitor(event_loop, BIND_THIS_METHOD(OnIdle))
+ :rtio_thread(true),
+ idle_monitor(event_loop, BIND_THIS_METHOD(OnIdle))
{
}