mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
introduce new flag that marks sinks/sources which can adjust the latency dynamically
This commit is contained in:
parent
9bca59efc1
commit
44ca897769
8 changed files with 64 additions and 21 deletions
|
|
@ -1152,6 +1152,11 @@ void pa_source_set_latency_range(pa_source *s, pa_usec_t min_latency, pa_usec_t
|
|||
|
||||
pa_assert(min_latency <= max_latency);
|
||||
|
||||
/* Hmm, let's see if someone forgot to set PA_SOURCE_DYNAMIC_LATENCY here... */
|
||||
pa_assert((min_latency == ABSOLUTE_MIN_LATENCY &&
|
||||
max_latency == ABSOLUTE_MAX_LATENCY) ||
|
||||
(s->flags & PA_SOURCE_DYNAMIC_LATENCY));
|
||||
|
||||
if (PA_SOURCE_IS_LINKED(s->state)) {
|
||||
pa_usec_t r[2];
|
||||
|
||||
|
|
@ -1196,6 +1201,11 @@ void pa_source_set_latency_range_within_thread(pa_source *s, pa_usec_t min_laten
|
|||
pa_assert(max_latency <= ABSOLUTE_MAX_LATENCY);
|
||||
pa_assert(min_latency <= max_latency);
|
||||
|
||||
/* Hmm, let's see if someone forgot to set PA_SOURCE_DYNAMIC_LATENCY here... */
|
||||
pa_assert((min_latency == ABSOLUTE_MIN_LATENCY &&
|
||||
max_latency == ABSOLUTE_MAX_LATENCY) ||
|
||||
(s->flags & PA_SOURCE_DYNAMIC_LATENCY));
|
||||
|
||||
s->thread_info.min_latency = min_latency;
|
||||
s->thread_info.max_latency = max_latency;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue