pub struct FrameBuf<'s> {
pub samples: &'s [i32],
pub sample_rate: u32,
pub channels: u8,
pub bits_per_sample: u32,
}Expand description
A buffer of samples read from a FlacStreamReader
In a conventional FLAC reader, the stream’s metadata is known in advance from the required STREAMINFO metadata block and is an error for it to change mid-file.
In a streamed reader, that metadata isn’t known in advance and can change from frame to frame. This buffer contains all the metadata fields in the frame for decoding/playback.
Fields§
§samples: &'s [i32]Decoded samples
Samples are interleaved by channel, like: [left₀ , right₀ , left₁ , right₁ , left₂ , right₂ , …]
sample_rate: u32The sample rate, in Hz
channels: u8Channel count, from 1 to 8
bits_per_sample: u32Bits-per-sample, from 4 to 32
Trait Implementations§
impl<'s> Copy for FrameBuf<'s>
impl<'s> Eq for FrameBuf<'s>
impl<'s> StructuralPartialEq for FrameBuf<'s>
Auto Trait Implementations§
impl<'s> Freeze for FrameBuf<'s>
impl<'s> RefUnwindSafe for FrameBuf<'s>
impl<'s> Send for FrameBuf<'s>
impl<'s> Sync for FrameBuf<'s>
impl<'s> Unpin for FrameBuf<'s>
impl<'s> UnwindSafe for FrameBuf<'s>
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