Struct android_audio::AndroidAudioStreamCommit
source · pub(crate) struct AndroidAudioStreamCommit {
pub(crate) buffer_ptr: *const u8,
pub(crate) stream: AAudioStreamPtr,
pub(crate) direction: AndroidAudioStreamDirection,
}
Fields§
§buffer_ptr: *const u8
§stream: AAudioStreamPtr
§direction: AndroidAudioStreamDirection
Trait Implementations§
source§impl AsyncBufferCommit for AndroidAudioStreamCommit
impl AsyncBufferCommit for AndroidAudioStreamCommit
source§fn commit<'life0, 'async_trait>(
&'life0 mut self,
nwritten: usize
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn commit<'life0, 'async_trait>(
&'life0 mut self,
nwritten: usize
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
async_write_playback_buffer
or async_read_capture_buffer
would trigger this
automatically. nframes
indicates the number of audio frames that were read or written to
the device.§fn latency_bytes(&self) -> u32
fn latency_bytes(&self) -> u32
latency_bytes
the current device latency.
For playback it means how many bytes need to be consumed
before the current playback buffer will be played.
For capture it means the latency in terms of bytes that the capture buffer was recorded.source§impl BufferCommit for AndroidAudioStreamCommit
impl BufferCommit for AndroidAudioStreamCommit
source§fn commit(&mut self, _nwritten: usize)
fn commit(&mut self, _nwritten: usize)
write_playback_buffer
or read_capture_buffer
would trigger this automatically. nframes
indicates the number of audio frames that were read or written to the device.§fn latency_bytes(&self) -> u32
fn latency_bytes(&self) -> u32
latency_bytes
the current device latency.
For playback it means how many bytes need to be consumed
before the current playback buffer will be played.
For capture it means the latency in terms of bytes that the capture buffer was recorded.impl Send for AndroidAudioStreamCommit
Auto Trait Implementations§
impl RefUnwindSafe for AndroidAudioStreamCommit
impl !Sync for AndroidAudioStreamCommit
impl Unpin for AndroidAudioStreamCommit
impl UnwindSafe for AndroidAudioStreamCommit
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