pub struct ExactOutputFormat { /* private fields */ }Expand description
Explicit output facts supplied by a caller, without device certification.
effective_bits is the known downstream signed-PCM precision, not the byte
width of the transport. For example, a normalized float transport can feed
a known 24-bit destination. Unknown precision can be retained for diagnosis
but is refused when constructing an exact adapter.
Implementations§
Source§impl ExactOutputFormat
impl ExactOutputFormat
Sourcepub fn new(
sample_rate: u32,
layout: ChannelLayout,
representation: ExactSampleRepresentation,
effective_bits: Option<u32>,
) -> Result<Self, ExactOutputError>
pub fn new( sample_rate: u32, layout: ChannelLayout, representation: ExactSampleRepresentation, effective_bits: Option<u32>, ) -> Result<Self, ExactOutputError>
Validate explicit rate, speaker positions and precision metadata.
Effective precision must be between 1 and 64 bits when known, and must fit a signed integer transport’s container. A float representation does not by itself prove the precision of any subsequent conversion.
Sourcepub fn sample_rate(self) -> u32
pub fn sample_rate(self) -> u32
Explicit output frames per second.
Sourcepub fn representation(self) -> ExactSampleRepresentation
pub fn representation(self) -> ExactSampleRepresentation
Selected transport representation and byte order.
Sourcepub fn effective_bits(self) -> Option<u32>
pub fn effective_bits(self) -> Option<u32>
Caller-supplied downstream precision; no measurement is implied.
Trait Implementations§
Source§impl Clone for ExactOutputFormat
impl Clone for ExactOutputFormat
Source§fn clone(&self) -> ExactOutputFormat
fn clone(&self) -> ExactOutputFormat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more