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

Fix proposed by Andrew Nguyen.
This commit is contained in:
Andrew Eikum 2012-09-17 15:44:06 -05:00 committed by Alexandre Julliard
parent 0932129993
commit b202b9f72d
2 changed files with 1 additions and 6 deletions

View file

@ -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 */

View file

@ -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) "