Closed btx closed 1 year ago
The value is kind of correct, just that I think mutagen should read the values unsigned, and currently reads it signed. For WAVE_FORMAT_EXTENSIBLE this format info is supposed to be FFFE (65534), which if you read this as a signed value is -2.
See https://learn.microsoft.com/en-us/windows/win32/api/mmreg/ns-mmreg-waveformatextensible and https://github.com/tpn/winsdk-10/blob/master/Include/10.0.16299.0/shared/mmreg.h
https://github.com/quodlibet/mutagen/pull/596 fixes the issue. With the patch these files properly return info.audio_format == 65534
I'm trying to identify a WAVE PCM audio file with multiple channels (3 and more) and it seems it's not identified correctly. Mutagen gives me invalid WAVE encoding (it returns
-2
instead of1
which is PCM).I was using sample files downloaded here https://www.mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Samples.html.
I have looked into mutagen code and it indeed does not seem to support extensible wave format.
I am not fluent in audio formats, so thanks a lot for any insight :)