quodlibet / mutagen

Python module for handling audio metadata
https://mutagen.readthedocs.io
GNU General Public License v2.0
1.54k stars 158 forks source link

Read the WAVE info attributes as unsigned short #596

Closed phw closed 1 year ago

phw commented 1 year ago

Microsoft defines these fields as WORD, which is usually unsigned. The audio format byte can take values like FFFE for extensible WAVE, which only makes sense if read unsigned.

Fixes #595

phw commented 1 year ago

See also https://learn.microsoft.com/en-us/windows/win32/api/mmreg/ns-mmreg-waveformat for how Microsoft defines this structure. All WORD values.