In the WaveStream class, the decision to use WAVEFORMATEXTENSIBLE is incorrect.
It only checks if the format is PCM and in that case correctly uses
WAVEFORMATEX, but it incorrectly decides to use WAVEFORMATEXTENSIBLE in all
other cases.
Line 123: if( pcmFormat.wf.wFormatTag == WAVE_FORMAT_PCM )
According to the MSDN documentation there are other decisions to be made for
formats other than PCM:
See
http://msdn.microsoft.com/en-us/library/microsoft.directx_sdk.xaudio2.waveformat
ex%28v=vs.85%29.aspx
For example, ADPCM (which I tested and can be played by XAudio2) requires you
to use the ADPCMWAVEFORMAT struct. xWMA requires the WAVEFORMATEXTENSIBLE
struct ONLY when it contains more than 2 channels, otherwise it must be read
with just the WAVEFORMATEX struct.
Original issue reported on code.google.com by klapstoe...@gmail.com on 23 Jan 2011 at 8:42
Original issue reported on code.google.com by
klapstoe...@gmail.com
on 23 Jan 2011 at 8:42