pub struct FlacEncoderParams {
pub verify_decoded: bool,
pub compression: FlacCompression,
pub channels: u16,
pub sample_rate: u32,
pub bits_per_sample: u32,
pub total_samples_estimate: u64,
}
Expand description
§Parameters for the encoder to encode the audio.
Fields§
§verify_decoded: bool
- If set to true, the FLAC encoder will send the encoded data to a decoder to verify if the encoding is successful, and the encoding process will be slower.
compression: FlacCompression
- The compression level of the FLAC file, a higher number means less file size.
channels: u16
- Num channels of the audio file, max channels is 8.
sample_rate: u32
- The sample rate of the audio file. Every FLAC frame contains this value.
bits_per_sample: u32
- How many bits in an
i32
are valid for a sample, for example, if this value is 16, youri32
sample should be between -32768 to +32767. Because the FLAC encoder only eats[i32]
, and you can’t just pass[i16]
to it. It seems like 8, 12, 16, 20, 24, 32 are valid values for this field.
total_samples_estimate: u64
- How many samples you will put into the encoder, set to zero if you don’t know.
Implementations§
Trait Implementations§
Source§impl Clone for FlacEncoderParams
impl Clone for FlacEncoderParams
Source§fn clone(&self) -> FlacEncoderParams
fn clone(&self) -> FlacEncoderParams
Returns a duplicate 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 FlacEncoderParams
impl Debug for FlacEncoderParams
Source§impl Default for FlacEncoderParams
impl Default for FlacEncoderParams
Source§impl PartialEq for FlacEncoderParams
impl PartialEq for FlacEncoderParams
impl Copy for FlacEncoderParams
impl StructuralPartialEq for FlacEncoderParams
Auto Trait Implementations§
impl Freeze for FlacEncoderParams
impl RefUnwindSafe for FlacEncoderParams
impl Send for FlacEncoderParams
impl Sync for FlacEncoderParams
impl Unpin for FlacEncoderParams
impl UnwindSafe for FlacEncoderParams
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