Skip to content

[bug] Saving AudioFile<double> as 32-bit WAV file (results in loud, scratchy noise) #96

@gitelope

Description

@gitelope

When an AudioFile<double> is saved to 32-bit WAV, the result is loud, scratchy noise.

This works for AudioFile<float>s but not for AudioFile<double>s:
Line 998 in AudioFile.h: sampleAsInt = (int32_t) reinterpret_cast<int32_t&> (samples[channel][i]);

(By the way, thanks for sharing your code! I'm in the process of replacing libsndfile in my audio library before making it public with a permissive license and I'm digging this single-header C++ library of yours.)

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