Skip to content

Instantly share code, notes, and snippets.

View gavingc's full-sized avatar

Gavin Kromhout gavingc

View GitHub Profile
@endolith
endolith / WAV interpretation.md
Last active August 3, 2023 23:45
Interpretation of WAV file sample data and asymmetry

How to handle asymmetry of WAV data?

WAV files can store PCM audio (WAVE_FORMAT_PCM). The WAV file format specification says:

The data format and maximum and minimums values for PCM waveform samples of various sizes are as follows:

Sample Size Data Format Maximum Value Minimum Value
One to eight bits Unsigned integer 255 (0xFF) 0
Nine or more bits Signed integer i Largest positive value of i Most negative value of i