Struct wasapi::AudioCaptureClient
source · pub struct AudioCaptureClient { /* private fields */ }
Expand description
Struct wrapping an IAudioCaptureClient.
Implementations§
source§impl AudioCaptureClient
impl AudioCaptureClient
sourcepub fn get_next_nbr_frames(&self) -> Result<Option<u32>, Box<dyn Error>>
pub fn get_next_nbr_frames(&self) -> Result<Option<u32>, Box<dyn Error>>
Get number of frames in next packet when in shared mode. In exclusive mode it returns None, instead use AudioClient::get_bufferframecount().
sourcepub fn read_from_device(
&self,
data: &mut [u8],
) -> Result<(u32, BufferFlags), Box<dyn Error>>
pub fn read_from_device( &self, data: &mut [u8], ) -> Result<(u32, BufferFlags), Box<dyn Error>>
Read raw bytes from a device into a slice. Returns the number of frames that was read, and the BufferFlags describing the buffer that the data was read from. The slice must be large enough to hold all data. If it is longer that needed, the unused elements will not be modified.
sourcepub fn read_from_device_to_deque(
&self,
data: &mut VecDeque<u8>,
) -> Result<BufferFlags, Box<dyn Error>>
pub fn read_from_device_to_deque( &self, data: &mut VecDeque<u8>, ) -> Result<BufferFlags, Box<dyn Error>>
Read raw bytes data from a device into a deque. Returns the BufferFlags describing the buffer that the data was read from.
Get the sharemode for this AudioCaptureClient. The sharemode is decided when the client is initialized.
Auto Trait Implementations§
impl Freeze for AudioCaptureClient
impl RefUnwindSafe for AudioCaptureClient
impl !Send for AudioCaptureClient
impl !Sync for AudioCaptureClient
impl Unpin for AudioCaptureClient
impl UnwindSafe for AudioCaptureClient
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more