Skip to content

Feature Request: Support for Finite Audio Header Creation and Public Export of Traits #79

@jBernavaPrah

Description

@jBernavaPrah

Hi there,

Firstly, I'd like to express my gratitude for the hound crate—it's been incredibly useful for my projects!

For my current project, I need to create a finite-length audio header. I've been using the following code to create an audio header:

let spec = hound::WavSpec {
    channels: 1,
    sample_rate: 16_000,
    bits_per_sample: 16,
    sample_format: hound::SampleFormat::Int,
};

let mut audio_headers: Vec<u8> = spec.into_header_for_infinite_file();

However, this generates an infinite header. I have not found a function within the crate that creates a finite header without needing to write the entire audio data to a writer.

Did I overlook any existing functionality for this purpose?

Given my understanding of the WAV format, I can manually adjust the length in the header. Nevertheless, having built-in support for finite headers would be very beneficial.

Additionally, it would be great if the WriteExt and ReadExt traits could be exported publicly. This would allow me to utilize functions like write_le_u32 and others directly in my code, offering more flexibility and control over the header creation process.

Thank you for considering these suggestions!

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