diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2013-05-22 12:03:47 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2013-06-04 00:38:44 +0530 |
commit | 3f16c7100be0b3f9aa5069350bc27c1f9d2aa47f (patch) | |
tree | 38796add5fd1da229c39e04aa730a2c574601f77 /src/tests | |
parent | 0862a281aafc016e85070de1fa7a25879edb8113 (diff) |
tests: Make loopback latency test run with rt priority
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/lo-latency-test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tests/lo-latency-test.c b/src/tests/lo-latency-test.c index 2bb6678d4..c22affcae 100644 --- a/src/tests/lo-latency-test.c +++ b/src/tests/lo-latency-test.c @@ -39,6 +39,9 @@ #include <pulse/pulseaudio.h> #include <pulse/mainloop.h> +/* for pa_make_realtime */ +#include <pulsecore/core-util.h> + #define SAMPLE_HZ 44100 #define CHANNELS 2 #define N_OUT (SAMPLE_HZ * 1) @@ -328,6 +331,8 @@ static void context_state_callback(pa_context *c, void *userdata) { case PA_CONTEXT_READY: { pa_buffer_attr buffer_attr; + pa_make_realtime(4); + /* Create playback stream */ buffer_attr.maxlength = -1; buffer_attr.tlength = SAMPLE_HZ * fs * PLAYBACK_LATENCY / 1000; |