mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
adjust max_rewind/max_request whenever the latency changes
This commit is contained in:
parent
e976034063
commit
298bd0b0c6
1 changed files with 5 additions and 0 deletions
|
|
@ -119,6 +119,7 @@ static int sink_process_msg(
|
|||
|
||||
static void sink_update_requested_latency_cb(pa_sink *s) {
|
||||
struct userdata *u;
|
||||
size_t nbytes;
|
||||
|
||||
pa_sink_assert_ref(s);
|
||||
pa_assert_se(u = s->userdata);
|
||||
|
|
@ -127,6 +128,10 @@ static void sink_update_requested_latency_cb(pa_sink *s) {
|
|||
|
||||
if (u->block_usec == (pa_usec_t) -1)
|
||||
u->block_usec = s->thread_info.max_latency;
|
||||
|
||||
nbytes = pa_usec_to_bytes(u->block_usec, &s->sample_spec);
|
||||
pa_sink_set_max_rewind_within_thread(s, nbytes);
|
||||
pa_sink_set_max_request_within_thread(s, nbytes);
|
||||
}
|
||||
|
||||
static void process_rewind(struct userdata *u, pa_usec_t now) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue