Skip to content

32bit flac support #36

@justjakka

Description

@justjakka

whenever im trying to decode samples from a 32bit flac i encounter an error

code

let mut reader = claxon::FlacReader::open(file)?;
for samples in reader
        .samples()
        .map(|sample| sample.unwrap())
        .collect::<Vec<_>>()
        .chunks(4096 * usize::try_from(config.channels).unwrap())
    {
        enc.process_interleaved(samples, u32::try_from(samples.len()).unwrap() / config.channels)
            .unwrap();
        let _ = samples
            .iter()
            .map(|sample| hasher.update(sample.to_le_bytes()))
            .collect::<Vec<_>>();
    }

panics with error FormatError("invalid frame header, encountered reserved value")
same behavior is encountered with simpler code:

let mut reader = claxon::FlacReader::open(file)?;
for sample in reader.samples() {
        sample?;
}

since 32 bit frame isnt implemented in this lib

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions