From f8f95e2dbd73d0d43211136e50a8d640f145872c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 6 Nov 2013 23:47:30 +0100 Subject: 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. --- src/OutputInit.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/OutputInit.cxx') diff --git a/src/OutputInit.cxx b/src/OutputInit.cxx index 49b5d68b9..28eba1ab2 100644 --- a/src/OutputInit.cxx +++ b/src/OutputInit.cxx @@ -171,6 +171,8 @@ ao_base_init(struct audio_output *ao, ao->open = false; ao->pause = false; ao->allow_play = true; + ao->in_playback_loop = false; + ao->woken_for_play = false; ao->fail_timer = nullptr; /* set up the filter chain */ -- cgit v1.2.3