pub struct SoftwareParameters { /* private fields */ }alsa only.Expand description
Collection of software parameters being configured for a Pcm handle.
Implementations§
Source§impl SoftwareParameters
impl SoftwareParameters
Sourcepub fn copy(&mut self, other: &SoftwareParameters)
pub fn copy(&mut self, other: &SoftwareParameters)
Copy one set of software parameters to another.
§Examples
use audio_device::alsa;
let mut a = alsa::Pcm::open_default(alsa::Stream::Playback)?;
let mut b = alsa::Pcm::open_default(alsa::Stream::Playback)?;
let a = a.software_parameters()?;
let mut b = b.software_parameters()?;
b.copy(&a);Sourcepub fn boundary(&self) -> Result<c_ulong>
pub fn boundary(&self) -> Result<c_ulong>
Get boundary for ring pointers from a software configuration container.
§Examples
use audio_device::alsa;
let mut pcm = alsa::Pcm::open_default(alsa::Stream::Playback)?;
let sw = pcm.software_parameters()?;
let boundary = sw.boundary()?;
dbg!(boundary);Sourcepub fn timestamp_mode(&self) -> Result<Timestamp>
pub fn timestamp_mode(&self) -> Result<Timestamp>
Get timestamp mode from a software configuration container.
§Examples
use audio_device::alsa;
let mut pcm = alsa::Pcm::open_default(alsa::Stream::Playback)?;
let sw = pcm.software_parameters()?;
let timestamp_mode = sw.timestamp_mode()?;
dbg!(timestamp_mode);Sourcepub fn timestamp_type(&self) -> Result<TimestampType>
pub fn timestamp_type(&self) -> Result<TimestampType>
Get timestamp type from a software configuration container.
§Examples
use audio_device::alsa;
let mut pcm = alsa::Pcm::open_default(alsa::Stream::Playback)?;
let sw = pcm.software_parameters()?;
let value = sw.timestamp_type()?;
dbg!(value);Sourcepub fn available_min(&self) -> Result<c_ulong>
pub fn available_min(&self) -> Result<c_ulong>
Get avail min from a software configuration container.
§Examples
use audio_device::alsa;
let mut pcm = alsa::Pcm::open_default(alsa::Stream::Playback)?;
let sw = pcm.software_parameters()?;
let available_min = sw.available_min()?;
dbg!(available_min);Sourcepub fn period_event(&self) -> Result<c_int>
pub fn period_event(&self) -> Result<c_int>
Get period event from a software configuration container.
§Examples
use audio_device::alsa;
let mut pcm = alsa::Pcm::open_default(alsa::Stream::Playback)?;
let sw = pcm.software_parameters()?;
let value = sw.period_event()?;Sourcepub fn start_threshold(&self) -> Result<c_ulong>
pub fn start_threshold(&self) -> Result<c_ulong>
Get start threshold from a software configuration container.
§Examples
use audio_device::alsa;
let mut pcm = alsa::Pcm::open_default(alsa::Stream::Playback)?;
let sw = pcm.software_parameters()?;
let value = sw.start_threshold()?;Sourcepub fn stop_threshold(&self) -> Result<c_ulong>
pub fn stop_threshold(&self) -> Result<c_ulong>
Get stop threshold from a software configuration container.
§Examples
use audio_device::alsa;
let mut pcm = alsa::Pcm::open_default(alsa::Stream::Playback)?;
let sw = pcm.software_parameters()?;
let value = sw.stop_threshold()?;Sourcepub fn silence_threshold(&self) -> Result<c_ulong>
pub fn silence_threshold(&self) -> Result<c_ulong>
Get silence threshold from a software configuration container.
A portion of playback buffer is overwritten with silence (see set_silence_size) when playback underrun is nearer than silence threshold.
§Examples
use audio_device::alsa;
let mut pcm = alsa::Pcm::open_default(alsa::Stream::Playback)?;
let sw = pcm.software_parameters()?;
let value = sw.silence_threshold()?;Sourcepub fn silence_size(&self) -> Result<c_ulong>
pub fn silence_size(&self) -> Result<c_ulong>
Get silence size from a software configuration container.
§Examples
use audio_device::alsa;
let mut pcm = alsa::Pcm::open_default(alsa::Stream::Playback)?;
let sw = pcm.software_parameters()?;
let value = sw.silence_size()?;