pub struct ProbedAudioSource { /* private fields */ }Expand description
An audio source which has had its metadata probed, but has not been decoded yet.
Implementations§
Source§impl ProbedAudioSource
impl ProbedAudioSource
pub fn probe_result(&self) -> &ProbeResult
pub fn probe_result_mut(&mut self) -> &mut ProbeResult
Sourcepub fn sample_rate(&self) -> Option<NonZeroU32>
pub fn sample_rate(&self) -> Option<NonZeroU32>
The sample rate of the audio source.
Returns None if the sample rate is unkown.
Sourcepub fn override_sample_rate(&mut self, sample_rate: NonZeroU32)
pub fn override_sample_rate(&mut self, sample_rate: NonZeroU32)
Override the sample rate of this resource with the given sample rate. This
can be useful if ProbedAudioSource::sample_rate returns None, but you
know what the sample rate is ahead of time.
pub fn num_channels(&self) -> NonZeroUsize
Auto Trait Implementations§
impl Freeze for ProbedAudioSource
impl !RefUnwindSafe for ProbedAudioSource
impl Send for ProbedAudioSource
impl Sync for ProbedAudioSource
impl Unpin for ProbedAudioSource
impl !UnwindSafe for ProbedAudioSource
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