[][src]Struct miniaudio::DeviceConfig

#[repr(transparent)]pub struct DeviceConfig(_);

Methods

impl DeviceConfig[src]

pub fn new(device_type: DeviceType) -> DeviceConfig[src]

pub fn device_type(&self) -> DeviceType[src]

pub fn set_device_type(&mut self, device_type: DeviceType)[src]

pub fn sample_rate(&self) -> u32[src]

pub fn set_sample_rate(&mut self, sample_rate: u32)[src]

pub fn period_size_in_frames(&self) -> u32[src]

pub fn set_period_size_in_frames(&mut self, size: u32)[src]

pub fn period_size_in_milliseconds(&self) -> u32[src]

pub fn set_period_size_in_milliseconds(&mut self, size: u32)[src]

pub fn periods(&self) -> u32[src]

pub fn set_periods(&mut self, periods: u32)[src]

pub fn peformance_profile(&self) -> PerformanceProfile[src]

pub fn set_performance_profile(&mut self, profile: PerformanceProfile)[src]

pub fn no_pre_zeroed_output_buffer(&self) -> bool[src]

pub fn set_no_pre_zeroed_output_buffer(&mut self, value: bool)[src]

pub fn no_clip(&self) -> bool[src]

pub fn set_no_clip(&mut self, no_clip: bool)[src]

pub fn playback(&self) -> &DeviceConfigPlayback[src]

pub fn playback_mut(&mut self) -> &mut DeviceConfigPlayback[src]

pub fn capture(&self) -> &DeviceConfigCapture[src]

pub fn capture_mut(&mut self) -> &mut DeviceConfigCapture[src]

pub fn resampling(&self) -> ResampleAlgorithm[src]

pub fn set_resampling(&mut self, algo: ResampleAlgorithm)[src]

pub fn set_data_callback<F>(&mut self, callback: F) where
    F: FnMut(NonNull<Device>, &FramesMut, &Frames) + Send + Sync + Clone + 'static, 
[src]

Sets the data callback for this device config.

IMPORTANT The function passed in here must be cloneable because each device that uses this config will create and use a clone of the given function and its environment. In order to share a variable between distinct device instances they have to be wrapped in some sort of cloneable thread-safe struct like an Arc.

pub fn set_stop_callback<F>(&mut self, callback: F) where
    F: FnMut(NonNull<Device>) + Clone + Send + Sync + 'static, 
[src]

Sets the stop callback for this device config.

IMPORTANT The function passed in here must be cloneable because each device that uses this config will create and use a clone of the given function and its environment. In order to share a variable between distinct device instances they have to be wrapped in some sort of cloneable thread-safe struct like an Arc.

Trait Implementations

impl Drop for DeviceConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.