summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <arun@arunraghavan.net>2018-05-04 19:18:15 +0530
committerArun Raghavan <arun@arunraghavan.net>2018-05-10 14:34:55 +0530
commit105a9b6745eed170979823e7002fb16b852e14f4 (patch)
treea57c6cfffdf1db2c65660afa953e2c6a644aa810
parentd171a15f91811e083b52a455fc67c79f676fae4b (diff)
downloadpulseaudio-105a9b6745eed170979823e7002fb16b852e14f4.tar.gz
null-sink,null-source: Use realtime scheduling if possible
We do this on other sink/source modules, and in general it makes sense to do so here as well.
-rw-r--r--src/modules/module-null-sink.c4
-rw-r--r--src/modules/module-null-source.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c
index 6cbe588de..fdab1121e 100644
--- a/src/modules/module-null-sink.c
+++ b/src/modules/module-null-sink.c
@@ -28,6 +28,7 @@
#include <pulse/rtclock.h>
#include <pulse/timeval.h>
+#include <pulse/util.h>
#include <pulse/xmalloc.h>
#include <pulsecore/i18n.h>
@@ -206,6 +207,9 @@ static void thread_func(void *userdata) {
pa_log_debug("Thread starting up");
+ if (u->core->realtime_scheduling)
+ pa_thread_make_realtime(u->core->realtime_priority);
+
pa_thread_mq_install(&u->thread_mq);
u->timestamp = pa_rtclock_now();
diff --git a/src/modules/module-null-source.c b/src/modules/module-null-source.c
index 0e4c8d2f2..251d0f523 100644
--- a/src/modules/module-null-source.c
+++ b/src/modules/module-null-source.c
@@ -29,6 +29,7 @@
#include <pulse/rtclock.h>
#include <pulse/timeval.h>
+#include <pulse/util.h>
#include <pulse/xmalloc.h>
#include <pulsecore/core-util.h>
@@ -132,6 +133,9 @@ static void thread_func(void *userdata) {
pa_log_debug("Thread starting up");
+ if (u->core->realtime_scheduling)
+ pa_thread_make_realtime(u->core->realtime_priority);
+
pa_thread_mq_install(&u->thread_mq);
u->timestamp = pa_rtclock_now();