mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-13 13:29:58 -05:00
optimize set_state_in_io_thread() callbacks
Source and sink are passed in arguments to set_state_in_io_thread() callbacks. There is optimal to access them directly.
This commit is contained in:
parent
de705a0eea
commit
556cdfa190
16 changed files with 41 additions and 41 deletions
|
|
@ -236,7 +236,7 @@ static int sink_set_state_in_io_thread_cb(pa_sink *s, pa_sink_state_t new_state,
|
|||
case PA_SINK_SUSPENDED:
|
||||
pa_log_debug("RAOP: SUSPENDED");
|
||||
|
||||
pa_assert(PA_SINK_IS_OPENED(u->sink->thread_info.state));
|
||||
pa_assert(PA_SINK_IS_OPENED(s->thread_info.state));
|
||||
|
||||
/* Issue a TEARDOWN if we are still connected */
|
||||
if (pa_raop_client_is_alive(u->raop)) {
|
||||
|
|
@ -249,7 +249,7 @@ static int sink_set_state_in_io_thread_cb(pa_sink *s, pa_sink_state_t new_state,
|
|||
pa_log_debug("RAOP: IDLE");
|
||||
|
||||
/* Issue a FLUSH if we're comming from running state */
|
||||
if (u->sink->thread_info.state == PA_SINK_RUNNING) {
|
||||
if (s->thread_info.state == PA_SINK_RUNNING) {
|
||||
pa_rtpoll_set_timer_disabled(u->rtpoll);
|
||||
pa_raop_client_flush(u->raop);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue