pub struct ApeInfo {Show 20 fields
pub version: u16,
pub compression_level: u16,
pub sample_rate: u32,
pub channels: u16,
pub bits_per_sample: u16,
pub total_samples: u64,
pub total_frames: u32,
pub blocks_per_frame: u32,
pub final_frame_blocks: u32,
pub duration_ms: u64,
pub block_align: u16,
pub format_flags: u16,
pub bytes_per_sample: u16,
pub average_bitrate_kbps: u32,
pub decompressed_bitrate_kbps: u32,
pub file_size_bytes: u64,
pub is_big_endian: bool,
pub is_floating_point: bool,
pub is_signed_8bit: bool,
pub source_format: SourceFormat,
}Expand description
File metadata accessible without decoding.
Fields§
§version: u16§compression_level: u16§sample_rate: u32§channels: u16§bits_per_sample: u16§total_samples: u64§total_frames: u32§blocks_per_frame: u32§final_frame_blocks: u32§duration_ms: u64§block_align: u16§format_flags: u16§bytes_per_sample: u16§average_bitrate_kbps: u32§decompressed_bitrate_kbps: u32§file_size_bytes: u64§is_big_endian: bool§is_floating_point: bool§is_signed_8bit: bool§source_format: SourceFormatImplementations§
Source§impl ApeInfo
impl ApeInfo
Sourcepub fn frame_samples(&self, frame_idx: u32) -> u32
pub fn frame_samples(&self, frame_idx: u32) -> u32
Number of samples (blocks) in a given frame.
Sourcepub fn generate_wav_header(&self) -> Vec<u8> ⓘ
pub fn generate_wav_header(&self) -> Vec<u8> ⓘ
Generate a standard 44-byte RIFF/WAVE header for the decoded audio.
Use this when ApeDecoder::wav_header_data() returns None (the
CREATE_WAV_HEADER flag was set, meaning the original header was not
stored). Combine with decoded PCM to produce a valid WAV file:
ⓘ
let header = decoder.info().generate_wav_header();
let pcm = decoder.decode_all()?;
output.write_all(&header)?;
output.write_all(&pcm)?;Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApeInfo
impl RefUnwindSafe for ApeInfo
impl Send for ApeInfo
impl Sync for ApeInfo
impl Unpin for ApeInfo
impl UnsafeUnpin for ApeInfo
impl UnwindSafe for ApeInfo
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