pub struct InterleavedAudioI32<'a> { /* private fields */ }Expand description
Borrowed, validated interleaved audio. Construction does not load NDI.
Samples are ordered sample-first, then channel. The number of samples per channel is the slice’s length divided by the channel count, which must divide it exactly; the equivalent FLTP allocation must fit the library’s 64 MiB audio limit. Metadata is not represented.
Implementations§
Source§impl<'a> InterleavedAudioI32<'a>
impl<'a> InterleavedAudioI32<'a>
Sourcepub fn new(
sample_rate: u32,
num_channels: u32,
data: &'a [i32],
reference_level: AudioReferenceLevel,
) -> Result<Self>
pub fn new( sample_rate: u32, num_channels: u32, data: &'a [i32], reference_level: AudioReferenceLevel, ) -> Result<Self>
Validate the header and the complete initialized source slice.
§Errors
Error::InvalidFrame for a sample rate outside
1..=i32::MAX, zero channels or samples, a data length
that is not a multiple of num_channels, or audio larger
than the 64 MiB limit.
Sourcepub fn with_timecode(self, timecode: Timecode) -> Self
pub fn with_timecode(self, timecode: Timecode) -> Self
Return this audio with timecode instead of
Timecode::SYNTHESIZE.
Sourcepub fn sample_rate(&self) -> u32
pub fn sample_rate(&self) -> u32
Sample rate in Hz.
Sourcepub fn num_channels(&self) -> u32
pub fn num_channels(&self) -> u32
Number of interleaved channels.
Sourcepub fn num_samples(&self) -> u32
pub fn num_samples(&self) -> u32
Number of samples per channel.
Trait Implementations§
Source§impl<'a> Clone for InterleavedAudioI32<'a>
impl<'a> Clone for InterleavedAudioI32<'a>
impl<'a> Copy for InterleavedAudioI32<'a>
Auto Trait Implementations§
impl<'a> Freeze for InterleavedAudioI32<'a>
impl<'a> RefUnwindSafe for InterleavedAudioI32<'a>
impl<'a> Send for InterleavedAudioI32<'a>
impl<'a> Sync for InterleavedAudioI32<'a>
impl<'a> Unpin for InterleavedAudioI32<'a>
impl<'a> UnsafeUnpin for InterleavedAudioI32<'a>
impl<'a> UnwindSafe for InterleavedAudioI32<'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