pub struct GroupListener { /* private fields */ }Expand description
One of a group’s streams, taken while it lives: dropping it stops that stream, and the group once none holds it.
Implementations§
Source§impl GroupListener
impl GroupListener
Sourcepub fn start(
group: &Arc<ListenerGroup>,
place: usize,
config: ListenerConfig,
) -> Result<Self>
pub fn start( group: &Arc<ListenerGroup>, place: usize, config: ListenerConfig, ) -> Result<Self>
Starts taking config’s stream in group’s place.
pub fn stats(&self) -> ListenerStats
Sourcepub fn take_peak(&self) -> f32
pub fn take_peak(&self) -> f32
The loudest sample since the last time this was asked, from 0 to 1.
Sourcepub fn take_peaks(&self) -> [f32; 2]
pub fn take_peaks(&self) -> [f32; 2]
The loudest sample in each of the first two channels since the last time this was asked, from 0 to 1.
Trait Implementations§
Source§impl Drop for GroupListener
impl Drop for GroupListener
Auto Trait Implementations§
impl !RefUnwindSafe for GroupListener
impl !UnwindSafe for GroupListener
impl Forget for GroupListener
impl Freeze for GroupListener
impl Move for GroupListener
impl Send for GroupListener
impl Sync for GroupListener
impl Unpin for GroupListener
impl UnsafeUnpin for GroupListener
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