Fix cfg feature compile bug

This commit is contained in:
2025-08-28 23:18:28 +08:00
parent ec97f2a87f
commit 6974ce665e
2 changed files with 3 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
//! Lossless audio utilities.
#[cfg(feature = "audio-flac")]
use super::flac::*;
use super::pcm::*;
use crate::types::*;
@@ -13,6 +14,7 @@ pub fn write_audio<W: Write + Seek, R: Read>(
) -> Result<()> {
match config.lossless_audio_fmt {
LosslessAudioFormat::Wav => write_pcm(header, reader, writer)?,
#[cfg(feature = "audio-flac")]
LosslessAudioFormat::Flac => write_flac(header, reader, writer, config)?,
}
Ok(())