Closed PeteHuf closed 7 years ago
Thanks. Good fix.
If you want to submit this as a pull request for DirectXTK and/or DirectXTK12, please do. I'd probably go with float matrix[XAUDIO2_MAX_AUDIO_CHANNELS * 8] = {};
to make it a little more obvious (it's easy to lose sight of the little braces next to the brackets).
If you don't want to the PR, I'll take care of it before the next release.
I'm not that familiar with submitting a PR, and took my copy of DXTK as a zip file, so I'll let you take care of it for next release.
pMatrixCoefficients is pointed to uninitialized memory. I was hearing horrible audio clipping and glitches and traced it down to the
matrix
below:float matrix[ XAUDIO2_MAX_AUDIO_CHANNELS * 8 ]{};
should fix this.