ar1st0crat / NWaves

.NET DSP library with a lot of audio processing functions
MIT License
453 stars 71 forks source link

Update WaveFile.cs #67

Closed Notheisz57 closed 1 year ago

Notheisz57 commented 1 year ago

Fix to allow parsing WAV files which use an Extension chunk to describe PCM audio formats greater than 16-bit. Microsoft states that any WAV file with a Bit Depth of more than 16 should use the Extension chunk to describe the Audio Format, but it will still use the same Audio Format constants used in the container-level Audio Format.

When a file uses the Extension chunk to describe a non-custom Audio Format, the container-level Audio Format will be set to 0xFFFE. This is currently not handled by WaveFile, and at the moment results in no sample data being read.

Link to relevant sources included in code comments.