-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
As an example, this file has ENC_DELAY
= 576 and ENC_PADDING
= 1119 according to foobar2000.
11 HYDR6C0DON$ $$$ PROD BY SIGMAR DELTA.mp3
First, Symphonia doesn't read and save the ENC_DELAY
and ENC_PADDING
to track.codec_params.delay
and track.codec_params.padding
, respectively.
Second, even if .delay
and .padding
has Some
value, the decoder
ignores these values and decodes the silence anyways, so now the decoded music is longer by ENC_DELAY + ENC_PADDING
. I can't tell whether FormatOptions
' .enable_gapless
is or should be incorporated into whether silence is decoded or not, but changing it does nothing.
Code snippet:
// 5
// 6
let mut format_ops = FormatOptions::default();
format_ops.enable_gapless = true;
let probe_result = probe.format(
Hint::new().with_extension("flac"),
mss,
&format_ops,
&MetadataOptions::default(),
)?;
let mut format = probe_result.format;
// 7
let mut track = format
.tracks()
.iter()
.find(|track| track.codec_params.codec != CODEC_TYPE_NULL)
.expect("no supported audio tracks")
.clone();
dbg!(track.codec_params.delay);
dbg!(track.codec_params.padding);
track.codec_params.with_delay(576);
track.codec_params.with_padding(1119);
dbg!(track.codec_params.delay);
dbg!(track.codec_params.padding);
Metadata
Metadata
Assignees
Labels
No labels