From d239e5dbe1c35553c7663b8079719f327a1ddfaa Mon Sep 17 00:00:00 2001 From: jakka Date: Sun, 15 Jun 2025 14:12:50 +0300 Subject: added final logic and cli flags --- src/flac.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/flac.rs') diff --git a/src/flac.rs b/src/flac.rs index 940e816..64ac6a9 100644 --- a/src/flac.rs +++ b/src/flac.rs @@ -20,6 +20,9 @@ use crate::files; pub const CURRENT_VENDOR: &str = "reference libFLAC 1.5.0 20250211"; +type BoxedFormatReader = Box; +type BoxedAudioDecoder = Box; + struct StreamConfig { channels: u32, bits_per_sample: Bps, @@ -187,11 +190,7 @@ fn encode_cycle_32( fn init_decoder( filename: impl AsRef, -) -> Result<( - Box, - Box, - StreamConfig, -)> { +) -> Result<(BoxedFormatReader, BoxedAudioDecoder, StreamConfig)> { let src = std::fs::File::open(filename)?; let mss = MediaSourceStream::new(Box::new(src), Default::default()); let mut hint = Hint::new(); -- cgit v1.3.1