#[repr(u32)]pub enum CodecBitRateControlMode {
Constant = 0,
LongTermAverage = 1,
VariableConstrained = 2,
Variable = 3,
}Expand description
Constants defining various bit rate control modes to be used with kAudioCodecPropertyBitRateControlMode. These modes are only applicable to encoders that can produce variable packet sizes, such as AAC.
Variants§
Constant = 0
The encoder maintains a constant bit rate suitable for use over a transmission
channel when decoding in real-time with a fixed end-to-end audio delay.
Note that while a constant bit rate is maintained in this mode, the number of bits
allocated to encode each fixed length of audio data may be variable
(ie. packet sizes are variable).
E.g., MP3 and MPEG-AAC use a bit reservoir mechanism to meet that constraint.
LongTermAverage = 1
The provided target bit rate is achieved over a long term average (typically after the first 1000 packets). This mode is similar to BitRateControlMode::Constant in the sense that the target bit rate will be maintained in a long term average. However, it does not provide constant delay when using constant bit rate transmission. This mode offers a better sound quality than BitRateControlMode::Constant can, that is, a more efficient encoding is performed.
VariableConstrained = 2
Encoder dynamically allocates the bit resources according to the characteristics of the underlying signal. However, some constraints are applied in order to limit the variation of the bit rate.
Variable = 3
Similar to the VBR constrained mode, however the packet size is virtually unconstrained. The coding process targets constant sound quality, and the sound quality level is set by kAudioCodecPropertySoundQualityForVBR. This mode usually provides the best tradeoff between quality and bit rate.
Trait Implementations§
Source§impl Clone for BitRateControlMode
impl Clone for BitRateControlMode
Source§fn clone(&self) -> BitRateControlMode
fn clone(&self) -> BitRateControlMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BitRateControlMode
Source§impl Debug for BitRateControlMode
impl Debug for BitRateControlMode
impl Eq for BitRateControlMode
Source§impl PartialEq for BitRateControlMode
impl PartialEq for BitRateControlMode
Source§fn eq(&self, other: &BitRateControlMode) -> bool
fn eq(&self, other: &BitRateControlMode) -> bool
self and other values to be equal, and is used by ==.