Enum servo_media_audio::render_thread::Sink
source · pub enum Sink {
RealTime(Box<dyn AudioSink>),
Offline(OfflineAudioSink),
}
Variants§
RealTime(Box<dyn AudioSink>)
Offline(OfflineAudioSink)
Trait Implementations§
source§impl AudioSink for Sink
impl AudioSink for Sink
fn init( &self, sample_rate: f32, sender: Sender<AudioRenderThreadMsg>, ) -> Result<(), AudioSinkError>
fn init_stream( &self, _: u8, _: f32, _: Box<dyn MediaSocket>, ) -> Result<(), AudioSinkError>
fn play(&self) -> Result<(), AudioSinkError>
fn stop(&self) -> Result<(), AudioSinkError>
fn has_enough_data(&self) -> bool
fn push_data(&self, chunk: Chunk) -> Result<(), AudioSinkError>
fn set_eos_callback( &self, callback: Box<dyn Fn(Box<dyn AsRef<[f32]>>) + Send + Sync + 'static>, )
Auto Trait Implementations§
impl !Freeze for Sink
impl !RefUnwindSafe for Sink
impl Send for Sink
impl !Sync for Sink
impl Unpin for Sink
impl !UnwindSafe for Sink
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