pub struct Spec {
pub channels: u16,
pub channel_mask: u32,
pub sample_rate: u32,
pub bits_per_sample: u16,
pub sample_format: SampleFormat,
}Fields§
§channels: u16§channel_mask: u32§sample_rate: u32§bits_per_sample: u16§sample_format: SampleFormatImplementations§
Source§impl Spec
impl Spec
pub fn new() -> Self
pub fn get_sample_type(&self) -> WaveSampleType
pub fn guess_channel_mask(&self) -> Result<u32, AudioError>
pub fn channel_mask_to_speaker_positions( &self, ) -> Result<Vec<SpeakerPosition>, AudioError>
pub fn channel_mask_to_speaker_positions_desc( &self, ) -> Result<Vec<String>, AudioError>
pub fn verify_for_pcm(&self) -> Result<(), AudioError>
pub fn is_channel_mask_valid(&self) -> bool
Trait Implementations§
impl Copy for Spec
Auto Trait Implementations§
impl Freeze for Spec
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnwindSafe for Spec
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