Commit b202b9f7 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

dsound: Don't require WAVE_FORMAT_EXTENSIBLE for non-16-bit formats.

Fix proposed by Andrew Nguyen.
parent 09321299
......@@ -940,11 +940,6 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
}
pwfxe = (WAVEFORMATEXTENSIBLE*)dsbd->lpwfxFormat;
if (pwfxe->Format.wBitsPerSample != 16 && pwfxe->Format.wBitsPerSample != 8 && pwfxe->Format.wFormatTag != WAVE_FORMAT_EXTENSIBLE)
{
WARN("wBitsPerSample=%d needs a WAVEFORMATEXTENSIBLE\n", dsbd->lpwfxFormat->wBitsPerSample);
return DSERR_CONTROLUNAVAIL;
}
if (pwfxe->Format.wFormatTag == WAVE_FORMAT_EXTENSIBLE)
{
/* check if cbSize is at least 22 bytes */
......
......@@ -753,7 +753,7 @@ static HRESULT test_secondary(LPGUID lpGuid)
if (gotdx8 || wfx.wBitsPerSample <= 16 || wfx.wFormatTag == WAVE_FORMAT_IEEE_FLOAT)
{
if (wfx.wBitsPerSample > 16)
ok(((rc == DSERR_CONTROLUNAVAIL || rc == DSERR_INVALIDCALL || rc == DSERR_INVALIDPARAM /* 2003 */) && !secondary)
ok(broken((rc == DSERR_CONTROLUNAVAIL || rc == DSERR_INVALIDCALL || rc == DSERR_INVALIDPARAM /* 2003 */) && !secondary)
|| rc == DS_OK, /* driver dependent? */
"IDirectSound_CreateSoundBuffer() "
"should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment