mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
tests: Make loopback latency test run with rt priority
This commit is contained in:
parent
0862a281aa
commit
3f16c7100b
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue