#[repr(C)]pub struct VSAudioFormat {
pub sample_type: VSSampleType,
pub bits_per_sample: c_int,
pub bytes_per_sample: c_int,
pub num_channels: c_int,
pub channel_layout: u64,
}
Expand description
Describes the format of a clip.
Use queryAudioFormat()
to fill it in with proper error checking.
Manually filling out the struct is allowed but discouraged
since illegal combinations of values will cause undefined behavior.
Fields§
§sample_type: VSSampleType
See VSSampleType
.
bits_per_sample: c_int
Number of significant bits.
bytes_per_sample: c_int
Number of bytes needed for a sample. This is always a power of 2 and the smallest possible
that can fit the number of bits used per sample, implicit from
VSAudioFormat::channel_layout
.
num_channels: c_int
Number of audio channels, implicit from VSAudioFormat::bits_per_sample
channel_layout: u64
A bitmask representing the channels present using the constants in 1 left shifted
by the constants in VSAudioChannels
.
Trait Implementations§
Source§impl Clone for VSAudioFormat
impl Clone for VSAudioFormat
Source§fn clone(&self) -> VSAudioFormat
fn clone(&self) -> VSAudioFormat
Returns a copy 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 VSAudioFormat
impl Debug for VSAudioFormat
Source§impl Hash for VSAudioFormat
impl Hash for VSAudioFormat
Source§impl PartialEq for VSAudioFormat
impl PartialEq for VSAudioFormat
impl Eq for VSAudioFormat
impl StructuralPartialEq for VSAudioFormat
Auto Trait Implementations§
impl Freeze for VSAudioFormat
impl RefUnwindSafe for VSAudioFormat
impl Send for VSAudioFormat
impl Sync for VSAudioFormat
impl Unpin for VSAudioFormat
impl UnwindSafe for VSAudioFormat
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