Struct alsa::pcm::HwParams

source ·
pub struct HwParams<'a>(/* private fields */);
Expand description

Implementations§

source§

impl<'a> HwParams<'a>

source

pub fn any(a: &'a PCM) -> Result<HwParams<'a>>

source

pub fn get_rate_resample(&self) -> Result<bool>

source

pub fn set_rate_resample(&self, resample: bool) -> Result<()>

source

pub fn set_channels_near(&self, v: u32) -> Result<u32>

source

pub fn set_channels(&self, v: u32) -> Result<()>

source

pub fn get_channels(&self) -> Result<u32>

source

pub fn get_channels_max(&self) -> Result<u32>

source

pub fn get_channels_min(&self) -> Result<u32>

source

pub fn test_channels(&self, v: u32) -> Result<()>

source

pub fn set_rate_near(&self, v: u32, dir: ValueOr) -> Result<u32>

source

pub fn set_rate(&self, v: u32, dir: ValueOr) -> Result<()>

source

pub fn get_rate(&self) -> Result<u32>

source

pub fn get_rate_max(&self) -> Result<u32>

source

pub fn get_rate_min(&self) -> Result<u32>

source

pub fn test_rate(&self, rate: u32) -> Result<()>

source

pub fn set_format(&self, v: Format) -> Result<()>

source

pub fn get_format(&self) -> Result<Format>

source

pub fn test_format(&self, v: Format) -> Result<()>

source

pub fn set_access(&self, v: Access) -> Result<()>

source

pub fn get_access(&self) -> Result<Access>

source

pub fn set_period_size_near(&self, v: Frames, dir: ValueOr) -> Result<Frames>

source

pub fn set_period_size(&self, v: Frames, dir: ValueOr) -> Result<()>

source

pub fn set_period_time_near(&self, v: u32, dir: ValueOr) -> Result<u32>

source

pub fn get_period_size(&self) -> Result<Frames>

source

pub fn get_period_size_min(&self) -> Result<Frames>

source

pub fn get_period_size_max(&self) -> Result<Frames>

source

pub fn set_periods(&self, v: u32, dir: ValueOr) -> Result<()>

source

pub fn get_periods(&self) -> Result<u32>

source

pub fn set_buffer_size_near(&self, v: Frames) -> Result<Frames>

source

pub fn set_buffer_size_max(&self, v: Frames) -> Result<Frames>

source

pub fn set_buffer_size_min(&self, v: Frames) -> Result<Frames>

source

pub fn set_buffer_size(&self, v: Frames) -> Result<()>

source

pub fn set_buffer_time_near(&self, v: u32, dir: ValueOr) -> Result<u32>

source

pub fn get_buffer_size(&self) -> Result<Frames>

source

pub fn get_buffer_size_min(&self) -> Result<Frames>

source

pub fn get_buffer_size_max(&self) -> Result<Frames>

source

pub fn get_buffer_time_min(&self) -> Result<u32>

source

pub fn get_buffer_time_max(&self) -> Result<u32>

source

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.

source

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.

source

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.

source

pub fn dump(&self, o: &mut Output) -> Result<()>

source

pub fn copy_from(&mut self, other: &HwParams<'a>)

Trait Implementations§

source§

impl<'a> Clone for HwParams<'a>

source§

fn clone(&self) -> HwParams<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for HwParams<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Drop for HwParams<'a>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for HwParams<'a>

§

impl<'a> !Send for HwParams<'a>

§

impl<'a> !Sync for HwParams<'a>

§

impl<'a> Unpin for HwParams<'a>

§

impl<'a> !UnwindSafe for HwParams<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.