pub struct ListenerGroup { /* private fields */ }Expand description
A running group of listeners. Dropping it stops them.
Implementations§
Source§impl ListenerGroup
impl ListenerGroup
Sourcepub fn start(places: usize, clock: Arc<MediaClock>) -> Result<Self>
pub fn start(places: usize, clock: Arc<MediaClock>) -> Result<Self>
Starts the group’s thread, with room for places streams, none
taken yet.
Sourcepub fn set_stream(
&self,
place: usize,
config: Option<ListenerConfig>,
) -> Result<()>
pub fn set_stream( &self, place: usize, config: Option<ListenerConfig>, ) -> Result<()>
Starts taking config’s stream in place, in place of what was
there, opening its socket and sink, or stops what was there.
Sourcepub fn stats(&self, place: usize) -> ListenerStats
pub fn stats(&self, place: usize) -> ListenerStats
place’s counters.
Sourcepub fn take_peak(&self, place: usize) -> f32
pub fn take_peak(&self, place: usize) -> f32
The loudest sample of place’s stream since the last time this was
asked, from 0 to 1.
Sourcepub fn take_peaks(&self, place: usize) -> [f32; 2]
pub fn take_peaks(&self, place: usize) -> [f32; 2]
The loudest sample in each of the first two channels of place’s
stream since the last time this was asked, from 0 to 1, for a
meter.
Trait Implementations§
Source§impl Drop for ListenerGroup
impl Drop for ListenerGroup
Auto Trait Implementations§
impl !RefUnwindSafe for ListenerGroup
impl !UnwindSafe for ListenerGroup
impl Freeze for ListenerGroup
impl Send for ListenerGroup
impl Sync for ListenerGroup
impl Unpin for ListenerGroup
impl UnsafeUnpin for ListenerGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more