Trait Audio Sink Impl
Source pub trait AudioSinkImpl: AudioBaseSinkImpl + ObjectSubclass<Type: IsA<AudioSink>> {
// Provided methods
fn close(&self) -> Result<(), LoggableError> { ... }
fn delay(&self) -> u32 { ... }
fn open(&self) -> Result<(), LoggableError> { ... }
fn prepare(
&self,
spec: &mut AudioRingBufferSpec,
) -> Result<(), LoggableError> { ... }
fn unprepare(&self) -> Result<(), LoggableError> { ... }
fn write(&self, audio_data: &[u8]) -> Result<i32, LoggableError> { ... }
fn reset(&self) { ... }
}Provided Methods§
Sourcefn close(&self) -> Result<(), LoggableError>
fn close(&self) -> Result<(), LoggableError>
Close the device.
Sourcefn delay(&self) -> u32
fn delay(&self) -> u32
Return how many frames are still in the device. Participates in computing the time for audio clocks and drives the synchronisation.
Sourcefn open(&self) -> Result<(), LoggableError>
fn open(&self) -> Result<(), LoggableError>
Open the device. No configuration needs to be done at this point. This function is also used to check if the device is available.
Sourcefn prepare(&self, spec: &mut AudioRingBufferSpec) -> Result<(), LoggableError>
fn prepare(&self, spec: &mut AudioRingBufferSpec) -> Result<(), LoggableError>
Prepare the device to operate with the specified parameters.
Sourcefn unprepare(&self) -> Result<(), LoggableError>
fn unprepare(&self) -> Result<(), LoggableError>
Undo operations done in prepare.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".