pub struct Activity(/* private fields */);Expand description
Which of a chunk’s local voices speak in one frame.
A bitset rather than a Vec<bool>: there is one of these per frame and a
ten-second chunk holds hundreds, so the whole answer stays in cache.
Implementations§
Source§impl Activity
impl Activity
Sourcepub const MAX_SPEAKERS: usize = 8
pub const MAX_SPEAKERS: usize = 8
The most local voices any engine may report. Beyond this an activity would not fit its bitset, and no published segmenter comes close.
Sourcepub fn speaking(self, local: usize) -> Self
pub fn speaking(self, local: usize) -> Self
Marks local as speaking. Positions at or past Self::MAX_SPEAKERS
are ignored — an engine claiming more voices than the set holds is a
bug in that engine, and dropping the overflow keeps the frames it did
get right.
pub fn speaks(self, local: usize) -> bool
Trait Implementations§
impl Copy for Activity
impl Eq for Activity
impl StructuralPartialEq for Activity
Auto Trait Implementations§
impl Freeze for Activity
impl RefUnwindSafe for Activity
impl Send for Activity
impl Sync for Activity
impl Unpin for Activity
impl UnsafeUnpin for Activity
impl UnwindSafe for Activity
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