Struct wasapi::AudioClient [−][src]
pub struct AudioClient { /* fields omitted */ }
Expand description
Struct wrapping an IAudioClient.
Implementations
impl AudioClient
[src]
impl AudioClient
[src]pub fn get_mixformat(&self) -> Result<WaveFormat, Box<dyn Error>>
[src]
pub fn get_mixformat(&self) -> Result<WaveFormat, Box<dyn Error>>
[src]Get MixFormat of the device. This is the format the device uses in shared mode and should always be accepted.
pub fn is_supported(
&self,
wave_fmt: &WaveFormat,
sharemode: &ShareMode
) -> Result<Option<WaveFormat>, Box<dyn Error>>
[src]
pub fn is_supported(
&self,
wave_fmt: &WaveFormat,
sharemode: &ShareMode
) -> Result<Option<WaveFormat>, Box<dyn Error>>
[src]Check if a format is supported. If it’s directly supported, this returns Ok(None). If not, but a similar format is, then the supported format is returned as Ok(Some(WaveFormat)).
pub fn get_periods(&self) -> Result<(i64, i64), Box<dyn Error>>
[src]
pub fn get_periods(&self) -> Result<(i64, i64), Box<dyn Error>>
[src]Get default and minimum periods in 100-nanosecond units
pub fn initialize_client(
&mut self,
wavefmt: &WaveFormat,
period: i64,
direction: &Direction,
sharemode: &ShareMode,
convert: bool
) -> Result<(), Box<dyn Error>>
[src]
pub fn initialize_client(
&mut self,
wavefmt: &WaveFormat,
period: i64,
direction: &Direction,
sharemode: &ShareMode,
convert: bool
) -> Result<(), Box<dyn Error>>
[src]Initialize an IAudioClient for the given direction, sharemode and format.
Setting convert
to true enables automatic samplerate and format conversion, meaning that almost any format will be accepted.
pub fn set_get_eventhandle(&self) -> Result<Handle, Box<dyn Error>>
[src]
pub fn set_get_eventhandle(&self) -> Result<Handle, Box<dyn Error>>
[src]Create an return an event handle for an IAudioClient
pub fn get_current_padding(&self) -> Result<u32, Box<dyn Error>>
[src]
pub fn get_current_padding(&self) -> Result<u32, Box<dyn Error>>
[src]Get current padding in frames. This represents the number of frames currently in the buffer, for both capture and render devices.
pub fn get_available_space_in_frames(&self) -> Result<u32, Box<dyn Error>>
[src]
pub fn get_available_space_in_frames(&self) -> Result<u32, Box<dyn Error>>
[src]Get buffer size minus padding in frames. Use this to find out how much free space is available in the buffer.
pub fn get_audiorenderclient(&self) -> Result<AudioRenderClient, Box<dyn Error>>
[src]
pub fn get_audiorenderclient(&self) -> Result<AudioRenderClient, Box<dyn Error>>
[src]Get a rendering (playback) client
pub fn get_audiocaptureclient(
&self
) -> Result<AudioCaptureClient, Box<dyn Error>>
[src]
pub fn get_audiocaptureclient(
&self
) -> Result<AudioCaptureClient, Box<dyn Error>>
[src]Get a capture client
pub fn get_audiosessioncontrol(
&self
) -> Result<AudioSessionControl, Box<dyn Error>>
[src]
pub fn get_audiosessioncontrol(
&self
) -> Result<AudioSessionControl, Box<dyn Error>>
[src]Get the AudioSessionControl