mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
sink-input, source-output: Assign to reference_ratio from a single place
This makes it easy to log a message every time the reference ratio changes. I also need to add a hook for reference ratio changes, but that need will go away if the stream relative volume controls will be created by the core in the future.
This commit is contained in:
parent
8a4a4f408c
commit
f480fb38a7
6 changed files with 77 additions and 11 deletions
|
|
@ -359,6 +359,12 @@ pa_usec_t pa_source_output_set_requested_latency_within_thread(pa_source_output
|
|||
* o->volume and fires change notifications. */
|
||||
void pa_source_output_set_volume_direct(pa_source_output *o, const pa_cvolume *volume);
|
||||
|
||||
/* Called from the main thread, from source.c only. This shouldn't be a public
|
||||
* function, but the flat volume logic in source.c currently needs a way to
|
||||
* directly set the source output reference ratio. This function simply sets
|
||||
* o->reference_ratio and logs a message if the value changes. */
|
||||
void pa_source_output_set_reference_ratio(pa_source_output *o, const pa_cvolume *ratio);
|
||||
|
||||
#define pa_source_output_assert_io_context(s) \
|
||||
pa_assert(pa_thread_mq_get() || !PA_SOURCE_OUTPUT_IS_LINKED((s)->state))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue