OutputControl: reduce the number of OutputThread wakeups
Wake up the OutputThread only if it hasn't already been woken up and if it isn't already in the playback loop.
This commit is contained in:
@@ -248,8 +248,11 @@ audio_output_play(struct audio_output *ao)
|
||||
|
||||
assert(ao->allow_play);
|
||||
|
||||
if (audio_output_is_open(ao))
|
||||
if (audio_output_is_open(ao) && !ao->in_playback_loop &&
|
||||
!ao->woken_for_play) {
|
||||
ao->woken_for_play = true;
|
||||
ao->cond.signal();
|
||||
}
|
||||
}
|
||||
|
||||
void audio_output_pause(struct audio_output *ao)
|
||||
|
||||
Reference in New Issue
Block a user