pub struct AudioData { /* private fields */ }Expand description
An audio frame
Implementations§
Source§impl AudioData
impl AudioData
Sourcepub fn sample_rate(&self) -> u32
pub fn sample_rate(&self) -> u32
The sample-rate of this buffer
Sourcepub fn no_channels(&self) -> u32
pub fn no_channels(&self) -> u32
The number of audio channels
Sourcepub fn no_samples(&self) -> u32
pub fn no_samples(&self) -> u32
The number of audio samples per channel
Sourcepub fn timestamp(&self) -> Option<i64>
pub fn timestamp(&self) -> Option<i64>
A per-frame timestamp filled in by the NDI SDK using a high precision clock.
This is only valid when receiving a frame. It represents the time (in 100 ns intervals measured in UTC time, since the Unix Time Epoch 1/1/1970 00:00 of the exact moment that the frame was submitted by the sending side If this value is None then this value is not available.
Sourcepub fn p_data(&self) -> *mut u8
pub fn p_data(&self) -> *mut u8
A pointer to the audio data
If FourCC is NDIlib_FourCC_type_FLTP, then this is the floating-point audio data in planar format, with each audio channel stored together with a stride between channels specified by channel_stride_in_bytes.
Sourcepub fn four_cc(&self) -> FourCCAudioType
pub fn four_cc(&self) -> FourCCAudioType
What FourCC type is for this frame
There is currently one supported format: FLTP.
Sourcepub fn channel_stride_in_bytes(&self) -> u32
pub fn channel_stride_in_bytes(&self) -> u32
The stride in bytes for a single channel.
This is the number of bytes that are used to step from one audio channel to another.