pub trait AudioDecodeBackend: Send {
// Required methods
fn submit(&mut self, packet: &Packet) -> Result<Submit, BackendError>;
fn receive(&mut self, wait: bool) -> Result<AudioPoll, BackendError>;
fn finish_input(&mut self) -> Result<(), BackendError>;
fn flush(&mut self) -> Result<(), BackendError>;
}Expand description
One decoder session for one audio track, used from one thread at a time.
Required Methods§
Sourcefn receive(&mut self, wait: bool) -> Result<AudioPoll, BackendError>
fn receive(&mut self, wait: bool) -> Result<AudioPoll, BackendError>
Takes decoded samples, in packet order. With wait, blocks briefly for them.
§Errors
A lost session or a failed decoder.
Sourcefn finish_input(&mut self) -> Result<(), BackendError>
fn finish_input(&mut self) -> Result<(), BackendError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".