pub struct AudioCaptureClient { /* private fields */ }
Expand description
Struct wrapping an IAudioCaptureClient.
Implementations§
Source§impl AudioCaptureClient
impl AudioCaptureClient
Sourcepub fn get_next_packet_size(&self) -> Result<Option<u32>, WasapiError>
pub fn get_next_packet_size(&self) -> Result<Option<u32>, WasapiError>
Get number of frames in next packet when in shared mode.
In exclusive mode it returns None
, instead use AudioClient::get_buffer_size() or AudioClient::get_current_padding().
See IAudioCaptureClient::GetNextPacketSize.
pub fn get_next_nbr_frames(&self) -> Result<Option<u32>, WasapiError>
get_next_packet_size
insteadSourcepub fn read_from_device(
&self,
data: &mut [u8],
) -> Result<(u32, BufferInfo), WasapiError>
pub fn read_from_device( &self, data: &mut [u8], ) -> Result<(u32, BufferInfo), WasapiError>
Read raw bytes from a device into a slice. Returns the number of frames
that was read, and the BufferInfo
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<BufferInfo, WasapiError>
pub fn read_from_device_to_deque( &self, data: &mut VecDeque<u8>, ) -> Result<BufferInfo, WasapiError>
Read raw bytes data from a device into a deque. Returns the BufferInfo describing the buffer that the data was read from.
Get the sharemode for this AudioCaptureClient. The sharemode is decided when the client is initialized.