Struct PcmStreamFormat
pub struct PcmStreamFormat { /* private fields */ }Expand description
The decoded PCM layout used by a processing stream.
Implementations§
§impl PcmFormat
impl PcmFormat
pub fn new(sample_rate: u32, channels: u16) -> Result<PcmFormat, DspError>
pub fn new(sample_rate: u32, channels: u16) -> Result<PcmFormat, DspError>
Rejects rates and channel counts that cannot describe audio frames.
pub fn with_layout(
sample_rate: u32,
layout: ChannelLayout,
) -> Result<PcmFormat, DspError>
pub fn with_layout( sample_rate: u32, layout: ChannelLayout, ) -> Result<PcmFormat, DspError>
Construct PCM with known speaker positions in ascending mask order.
pub fn sample_rate(self) -> u32
pub fn sample_rate(self) -> u32
Frames per second, shared by every channel in this stream.
pub fn layout(self) -> ChannelLayout
pub fn layout(self) -> ChannelLayout
Known speaker positions, or an explicit count-only layout.
Trait Implementations§
impl Copy for PcmFormat
impl Eq for PcmFormat
impl StructuralPartialEq for PcmFormat
Auto Trait Implementations§
impl Freeze for PcmFormat
impl RefUnwindSafe for PcmFormat
impl Send for PcmFormat
impl Sync for PcmFormat
impl Unpin for PcmFormat
impl UnwindSafe for PcmFormat
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