Struct servo_media_audio::offline_sink::OfflineAudioSink
source · pub struct OfflineAudioSink {
buffer: RefCell<Option<Vec<f32>>>,
channel_count: usize,
has_enough_data: Cell<bool>,
length: usize,
rendered_blocks: Cell<usize>,
eos_callback: RefCell<Option<Box<dyn Fn(Box<dyn AsRef<[f32]>>) + Send + Sync + 'static>>>,
}
Fields§
§buffer: RefCell<Option<Vec<f32>>>
§channel_count: usize
§has_enough_data: Cell<bool>
§length: usize
§rendered_blocks: Cell<usize>
§eos_callback: RefCell<Option<Box<dyn Fn(Box<dyn AsRef<[f32]>>) + Send + Sync + 'static>>>
Implementations§
Trait Implementations§
source§impl AudioSink for OfflineAudioSink
impl AudioSink for OfflineAudioSink
fn init( &self, _: f32, _: 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 OfflineAudioSink
impl !RefUnwindSafe for OfflineAudioSink
impl Send for OfflineAudioSink
impl !Sync for OfflineAudioSink
impl Unpin for OfflineAudioSink
impl !UnwindSafe for OfflineAudioSink
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