pub struct AudioSpan<'a> {
pub block: &'a AudioBlock,
pub starts_source: bool,
pub ends_source: bool,
}Expand description
A provider’s answer to one request: source samples, and what the source holds on either side of them.
Fields§
§block: &'a AudioBlockSource samples at the project rate, read by their own start_sample.
starts_source: boolWhether the source has no samples before block.start_sample: the
block begins where the source’s audio does, such as a stream that
starts 50 ms into its container.
ends_source: boolWhether the source has no samples from block.end_sample() on: the
block ends where the source’s audio does.
Implementations§
Source§impl<'a> AudioSpan<'a>
impl<'a> AudioSpan<'a>
Sourcepub const fn whole(block: &'a AudioBlock) -> Self
pub const fn whole(block: &'a AudioBlock) -> Self
A block that holds its source’s entire audio, as a source decoded once from end to end is.
Sourcepub fn covers(&self, start: i64, end: i64) -> bool
pub fn covers(&self, start: i64, end: i64) -> bool
Whether the span accounts for every sample of [start, end): each is
in the block, or before it with Self::starts_source, or after it
with Self::ends_source, where the source is silent.
Trait Implementations§
impl<'a> Copy for AudioSpan<'a>
impl<'a> StructuralPartialEq for AudioSpan<'a>
Auto Trait Implementations§
impl<'a> Freeze for AudioSpan<'a>
impl<'a> RefUnwindSafe for AudioSpan<'a>
impl<'a> Send for AudioSpan<'a>
impl<'a> Sync for AudioSpan<'a>
impl<'a> Unpin for AudioSpan<'a>
impl<'a> UnsafeUnpin for AudioSpan<'a>
impl<'a> UnwindSafe for AudioSpan<'a>
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