28 #ifndef ASYNC_AUDIO_VALVE_INCLUDED
29 #define ASYNC_AUDIO_VALVE_INCLUDED
123 : block_when_closed(false), is_open(true),
124 is_idle(true), is_flushing(false), input_stopped(false)
144 if (is_open == do_open)
155 input_stopped =
false;
161 if (!is_idle && !is_flushing)
165 if (!block_when_closed && input_stopped)
167 input_stopped =
false;
190 if (block_when_closed == this->block_when_closed)
195 this->block_when_closed = block_when_closed;
197 if (!block_when_closed && input_stopped)
199 input_stopped =
false;
244 ret = (block_when_closed ? 0 : count);
249 input_stopped =
true;
292 input_stopped =
false;
307 bool was_flushing = is_flushing;
310 if (is_open && was_flushing)
323 bool block_when_closed;