pub enum SampleRate {
Rate8000 = 8_000,
Rate16000 = 16_000,
Rate22050 = 22_050,
Rate44100 = 44_100,
Rate48000 = 48_000,
}Expand description
Audio sample rate enumeration
Defines standard sample rates supported by the Android audio system. The sample rate is the number of audio samples captured per second, measured in Hz.
§Examples
use android_media::SampleRate;
let rate = SampleRate::Rate16000;
assert_eq!(rate.value(), 16000);Variants§
Rate8000 = 8_000
8000 Hz - commonly used for speech recognition
Rate16000 = 16_000
16000 Hz - standard sample rate for voice applications
Rate22050 = 22_050
22050 Hz - half of CD quality
Rate44100 = 44_100
44100 Hz - CD audio standard sample rate
Rate48000 = 48_000
48000 Hz - professional audio standard sample rate
Implementations§
Trait Implementations§
Source§impl Clone for SampleRate
impl Clone for SampleRate
Source§fn clone(&self) -> SampleRate
fn clone(&self) -> SampleRate
Returns a duplicate of the value. Read more
1.0.0 · 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 SampleRate
impl Debug for SampleRate
Source§impl PartialEq for SampleRate
impl PartialEq for SampleRate
impl Copy for SampleRate
impl Eq for SampleRate
impl StructuralPartialEq for SampleRate
Auto Trait Implementations§
impl Freeze for SampleRate
impl RefUnwindSafe for SampleRate
impl Send for SampleRate
impl Sync for SampleRate
impl Unpin for SampleRate
impl UnwindSafe for SampleRate
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