mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-09 13:29:59 -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
|
|
@ -494,8 +494,6 @@ unsigned pa_sink_used_by(pa_sink *s); /* Number of connected streams which are n
|
|||
* why "ignore_output" may be relevant). */
|
||||
unsigned pa_sink_check_suspend(pa_sink *s, pa_sink_input *ignore_input, pa_source_output *ignore_output);
|
||||
|
||||
#define pa_sink_get_state(s) ((s)->state)
|
||||
|
||||
const char *pa_sink_state_to_string(pa_sink_state_t state);
|
||||
|
||||
/* Moves all inputs away, and stores them in pa_queue */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue