pub fn queue<S>(
keep_alive_if_empty: bool
) -> (Arc<SourcesQueueInput<S>>, SourcesQueueOutput<S>)
Expand description
Builds a new queue. It consists of an input and an output.
The input can be used to add sounds to the end of the queue, while the output implements
Source
and plays the sounds.
The parameter indicates how the queue should behave if the queue becomes empty:
- If you pass
true
, then the queue is infinite and will play a silence instead until you add a new sound. - If you pass
false
, then the queue will report that it has finished playing.