ao/wasapi: more consistent/reliable method of computing extra WAVEFORMATEXTENSIBLE size

This commit is contained in:
Kevin Mitchell 2014-11-28 07:50:34 -08:00
parent 8908b80b77
commit b0854bc42c
1 changed files with 1 additions and 2 deletions

View File

@ -172,8 +172,7 @@ static void set_format(WAVEFORMATEXTENSIBLE *wformat, WORD bytepersample,
wformat->Format.nAvgBytesPerSec = samplerate * block_align; wformat->Format.nAvgBytesPerSec = samplerate * block_align;
wformat->Format.nBlockAlign = block_align; wformat->Format.nBlockAlign = block_align;
wformat->Format.wBitsPerSample = bytepersample * 8; wformat->Format.wBitsPerSample = bytepersample * 8;
wformat->Format.cbSize = wformat->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);
22; /* must be at least 22 for WAVE_FORMAT_EXTENSIBLE */
if (bytepersample == 4) if (bytepersample == 4)
wformat->SubFormat = mp_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; wformat->SubFormat = mp_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
else else