diff --git a/plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp b/plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp index 606b3e4630..225e0ddaac 100644 --- a/plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp +++ b/plugins/spu2-x/src/Windows/SndOut_XAudio2.cpp @@ -111,15 +111,15 @@ private: { WAVEFORMATEXTENSIBLE wfx; - memset(&wfx, 0, sizeof(WAVEFORMATEXTENSIBLE)); + memset(&wfx, 0, sizeof(WAVEFORMATEXTENSIBLE)); wfx.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; wfx.Format.nSamplesPerSec = SampleRate; wfx.Format.nChannels = m_nChannels; wfx.Format.wBitsPerSample = 16; wfx.Format.nBlockAlign = wfx.Format.nChannels*wfx.Format.wBitsPerSample/8; wfx.Format.nAvgBytesPerSec = SampleRate * wfx.Format.nBlockAlign; - wfx.Format.cbSize = 22; - wfx.Samples.wValidBitsPerSample = 0; + wfx.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX); + wfx.Samples.wValidBitsPerSample = 16; wfx.dwChannelMask = chanConfig; wfx.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;