pub struct HwParams<'a>(/* private fields */);
Expand description
snd_pcm_hw_params_t wrapper
Implementations§
source§impl<'a> HwParams<'a>
impl<'a> HwParams<'a>
pub fn any(a: &'a PCM) -> Result<HwParams<'a>>
pub fn get_rate_resample(&self) -> Result<bool>
pub fn set_rate_resample(&self, resample: bool) -> Result<()>
pub fn set_channels_near(&self, v: u32) -> Result<u32>
pub fn set_channels(&self, v: u32) -> Result<()>
pub fn get_channels(&self) -> Result<u32>
pub fn get_channels_max(&self) -> Result<u32>
pub fn get_channels_min(&self) -> Result<u32>
pub fn test_channels(&self, v: u32) -> Result<()>
pub fn set_rate_near(&self, v: u32, dir: ValueOr) -> Result<u32>
pub fn set_rate(&self, v: u32, dir: ValueOr) -> Result<()>
pub fn get_rate(&self) -> Result<u32>
pub fn get_rate_max(&self) -> Result<u32>
pub fn get_rate_min(&self) -> Result<u32>
pub fn test_rate(&self, rate: u32) -> Result<()>
pub fn set_format(&self, v: Format) -> Result<()>
pub fn get_format(&self) -> Result<Format>
pub fn test_format(&self, v: Format) -> Result<()>
pub fn set_access(&self, v: Access) -> Result<()>
pub fn get_access(&self) -> Result<Access>
pub fn set_period_size_near(&self, v: Frames, dir: ValueOr) -> Result<Frames>
pub fn set_period_size(&self, v: Frames, dir: ValueOr) -> Result<()>
pub fn set_period_time_near(&self, v: u32, dir: ValueOr) -> Result<u32>
pub fn get_period_size(&self) -> Result<Frames>
pub fn get_period_size_min(&self) -> Result<Frames>
pub fn get_period_size_max(&self) -> Result<Frames>
pub fn set_periods(&self, v: u32, dir: ValueOr) -> Result<()>
pub fn get_periods(&self) -> Result<u32>
pub fn set_buffer_size_near(&self, v: Frames) -> Result<Frames>
pub fn set_buffer_size_max(&self, v: Frames) -> Result<Frames>
pub fn set_buffer_size_min(&self, v: Frames) -> Result<Frames>
pub fn set_buffer_size(&self, v: Frames) -> Result<()>
pub fn set_buffer_time_near(&self, v: u32, dir: ValueOr) -> Result<u32>
pub fn get_buffer_size(&self) -> Result<Frames>
pub fn get_buffer_size_min(&self) -> Result<Frames>
pub fn get_buffer_size_max(&self) -> Result<Frames>
pub fn get_buffer_time_min(&self) -> Result<u32>
pub fn get_buffer_time_max(&self) -> Result<u32>
sourcepub fn can_pause(&self) -> bool
pub fn can_pause(&self) -> bool
Returns true if the alsa stream can be paused, false if not.
This function should only be called when the configuration space contains a single
configuration. Call PCM::hw_params
to choose a single configuration from the
configuration space.
sourcepub fn can_resume(&self) -> bool
pub fn can_resume(&self) -> bool
Returns true if the alsa stream can be resumed, false if not.
This function should only be called when the configuration space contains a single
configuration. Call PCM::hw_params
to choose a single configuration from the
configuration space.
sourcepub fn supports_audio_ts_type(&self, type_: AudioTstampType) -> bool
pub fn supports_audio_ts_type(&self, type_: AudioTstampType) -> bool
Returns true if the alsa stream supports the provided AudioTstampType
, false if not.
This function should only be called when the configuration space contains a single
configuration. Call PCM::hw_params
to choose a single configuration from the
configuration space.