mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-12 13:30:10 -05:00
sink, source: remove the state getters
pa_sink_get_state() and pa_source_get_state() just return the state variable. We can as well access the state variable directly. There are no behaviour changes, except that module-virtual-source accessed the main thread's sink state variable from its push() callback. I fixed the module so that it uses the thread_info.state variable instead. Also, the compiler started to complain about comparing a sink state variable to a source state enum value in protocol-esound.c. The underlying bug was that a source pointer was assigned to a variable whose type was a sink pointer (somehow using the pa_source_get_state() macro confused the compiler enough so that it didn't complain before). I fixed the variable type.
This commit is contained in:
parent
b4a36453da
commit
6665b466d2
26 changed files with 82 additions and 87 deletions
|
|
@ -250,7 +250,7 @@ char *pa_sink_list_to_string(pa_core *c) {
|
|||
sink->flags & PA_SINK_LATENCY ? "LATENCY " : "",
|
||||
sink->flags & PA_SINK_FLAT_VOLUME ? "FLAT_VOLUME " : "",
|
||||
sink->flags & PA_SINK_DYNAMIC_LATENCY ? "DYNAMIC_LATENCY" : "",
|
||||
pa_sink_state_to_string(pa_sink_get_state(sink)),
|
||||
pa_sink_state_to_string(sink->state),
|
||||
pa_suspend_cause_to_string(sink->suspend_cause, suspend_cause_buf),
|
||||
sink->priority,
|
||||
pa_cvolume_snprint_verbose(cv,
|
||||
|
|
@ -361,7 +361,7 @@ char *pa_source_list_to_string(pa_core *c) {
|
|||
source->flags & PA_SOURCE_DECIBEL_VOLUME ? "DECIBEL_VOLUME " : "",
|
||||
source->flags & PA_SOURCE_LATENCY ? "LATENCY " : "",
|
||||
source->flags & PA_SOURCE_DYNAMIC_LATENCY ? "DYNAMIC_LATENCY" : "",
|
||||
pa_source_state_to_string(pa_source_get_state(source)),
|
||||
pa_source_state_to_string(source->state),
|
||||
pa_suspend_cause_to_string(source->suspend_cause, suspend_cause_buf),
|
||||
source->priority,
|
||||
pa_cvolume_snprint_verbose(cv,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue