pub enum AudioFormat {
Pcm16,
Opus,
Mp3,
Wav,
Flac,
Ogg,
}Available on crate feature
audio only.Expand description
Supported audio formats for encode/decode at transport edges.
Variants§
Pcm16
Raw PCM-16 LE (internal format, no header).
Opus
Opus codec (not yet implemented).
Mp3
MP3 format.
Wav
WAV (RIFF) format.
Flac
FLAC lossless format.
Ogg
Ogg container format.
Implementations§
Source§impl AudioFormat
impl AudioFormat
Sourcepub fn supports_encode(&self) -> bool
pub fn supports_encode(&self) -> bool
Returns true if this format has a working encode() implementation.
Currently only Pcm16 and Wav support encoding.
Sourcepub fn supports_decode(&self) -> bool
pub fn supports_decode(&self) -> bool
Returns true if this format has a working decode() implementation.
Currently only Pcm16 and Wav support decoding.
Trait Implementations§
Source§impl Clone for AudioFormat
impl Clone for AudioFormat
Source§fn clone(&self) -> AudioFormat
fn clone(&self) -> AudioFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AudioFormat
impl Debug for AudioFormat
Source§impl Default for AudioFormat
impl Default for AudioFormat
Source§fn default() -> AudioFormat
fn default() -> AudioFormat
Returns the “default value” for a type. Read more
Source§impl PartialEq for AudioFormat
impl PartialEq for AudioFormat
Source§fn eq(&self, other: &AudioFormat) -> bool
fn eq(&self, other: &AudioFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for AudioFormat
impl Eq for AudioFormat
impl StructuralPartialEq for AudioFormat
Auto Trait Implementations§
impl Freeze for AudioFormat
impl RefUnwindSafe for AudioFormat
impl Send for AudioFormat
impl Sync for AudioFormat
impl Unpin for AudioFormat
impl UnsafeUnpin for AudioFormat
impl UnwindSafe for AudioFormat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.