mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
tunnel-sink-new: Limit the maximum latency to 200 ms
The default maximum latency is 10 seconds, which is not good, especially since the tunnel sink doesn't support rewinding. Due to the lack of rewinding, e.g. volume changes take a long time with large latencies.
This commit is contained in:
parent
9dd4e8df3e
commit
9c135b998c
1 changed files with 2 additions and 0 deletions
|
|
@ -60,6 +60,7 @@ PA_MODULE_USAGE(
|
|||
"cookie=<cookie file path>"
|
||||
);
|
||||
|
||||
#define MAX_LATENCY_USEC (200 * PA_USEC_PER_MSEC)
|
||||
#define TUNNEL_THREAD_FAILED_MAINLOOP 1
|
||||
|
||||
static void stream_state_cb(pa_stream *stream, void *userdata);
|
||||
|
|
@ -525,6 +526,7 @@ int pa__init(pa_module *m) {
|
|||
u->sink->userdata = u;
|
||||
u->sink->parent.process_msg = sink_process_msg_cb;
|
||||
u->sink->update_requested_latency = sink_update_requested_latency_cb;
|
||||
pa_sink_set_latency_range(u->sink, 0, MAX_LATENCY_USEC);
|
||||
|
||||
/* set thread message queue */
|
||||
pa_sink_set_asyncmsgq(u->sink, u->thread_mq->inq);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue