pub struct AudioWaveformBatchView<'a> {
pub sample_rate: u32,
/* private fields */
}Expand description
Data type for audio waveform batch view.
Fields§
§sample_rate: u32Sample rate in hertz.
Implementations§
Source§impl<'a> AudioWaveformBatchView<'a>
impl<'a> AudioWaveformBatchView<'a>
Sourcepub fn new(sample_rate: u32, tensor: F32TensorView<'a>) -> Result<Self>
pub fn new(sample_rate: u32, tensor: F32TensorView<'a>) -> Result<Self>
Creates a new value.
Sourcepub fn from_dims(
sample_rate: u32,
dims: impl Into<Vec<usize>>,
values: &'a [f32],
) -> Result<Self>
pub fn from_dims( sample_rate: u32, dims: impl Into<Vec<usize>>, values: &'a [f32], ) -> Result<Self>
Builds this value from dims.
Sourcepub fn tensor(&self) -> &F32TensorView<'a>
pub fn tensor(&self) -> &F32TensorView<'a>
Returns tensor.
Sourcepub fn batch_size(&self) -> usize
pub fn batch_size(&self) -> usize
Returns batch size.
Sourcepub fn channel_count(&self) -> usize
pub fn channel_count(&self) -> usize
Returns channel count.
Sourcepub fn time_steps(&self) -> usize
pub fn time_steps(&self) -> usize
Returns time steps.
Sourcepub fn duration_seconds(&self) -> f64
pub fn duration_seconds(&self) -> f64
Returns duration seconds.
Trait Implementations§
Source§impl<'a> Clone for AudioWaveformBatchView<'a>
impl<'a> Clone for AudioWaveformBatchView<'a>
Source§fn clone(&self) -> AudioWaveformBatchView<'a>
fn clone(&self) -> AudioWaveformBatchView<'a>
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<'a> Debug for AudioWaveformBatchView<'a>
impl<'a> Debug for AudioWaveformBatchView<'a>
Source§impl<'a> PartialEq for AudioWaveformBatchView<'a>
impl<'a> PartialEq for AudioWaveformBatchView<'a>
Source§fn eq(&self, other: &AudioWaveformBatchView<'a>) -> bool
fn eq(&self, other: &AudioWaveformBatchView<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for AudioWaveformBatchView<'a>
Auto Trait Implementations§
impl<'a> Freeze for AudioWaveformBatchView<'a>
impl<'a> RefUnwindSafe for AudioWaveformBatchView<'a>
impl<'a> Send for AudioWaveformBatchView<'a>
impl<'a> Sync for AudioWaveformBatchView<'a>
impl<'a> Unpin for AudioWaveformBatchView<'a>
impl<'a> UnsafeUnpin for AudioWaveformBatchView<'a>
impl<'a> UnwindSafe for AudioWaveformBatchView<'a>
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