msacm32: Don't write cbSize if the format is WAVE_FORMAT_PCM.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Zebediah Figura 2017-06-01 14:16:43 -05:00 committed by Alexandre Julliard
parent 2aaeeb105e
commit 4e0c3707c3
1 changed files with 2 additions and 1 deletions

View File

@ -78,7 +78,8 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid,
afd.pwfx = HeapAlloc(MSACM_hHeap, 0, paftd->cbFormatSize);
if (!afd.pwfx) return FALSE;
afd.pwfx->wFormatTag = paftd->dwFormatTag;
afd.pwfx->cbSize = paftd->cbFormatSize;
if (paftd->dwFormatTag != WAVE_FORMAT_PCM)
afd.pwfx->cbSize = paftd->cbFormatSize - sizeof(WAVEFORMATEX);
afd.cbwfx = paftd->cbFormatSize;
for (i = 0; i < paftd->cStandardFormats; i++) {