Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ impl SourcesQueueInput {
self.keep_alive_if_empty.load(Ordering::Acquire)
}

/// Returns the additional length of the queue.
pub fn queue_len(&self) -> usize {
self.next_sounds.lock().unwrap().len()
}

/// Removes all the sounds from the queue. Returns the number of sounds cleared.
pub fn clear(&self) -> usize {
let mut sounds = self.next_sounds.lock().unwrap();
Expand Down
Loading