mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-16 05:07:36 +00:00
dsound: Don't require WAVE_FORMAT_EXTENSIBLE for non-16-bit formats.
Fix proposed by Andrew Nguyen.
This commit is contained in:
parent
0932129993
commit
b202b9f72d
|
@ -940,11 +940,6 @@ HRESULT DirectSoundDevice_CreateSoundBuffer(
|
||||||
}
|
}
|
||||||
pwfxe = (WAVEFORMATEXTENSIBLE*)dsbd->lpwfxFormat;
|
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)
|
if (pwfxe->Format.wFormatTag == WAVE_FORMAT_EXTENSIBLE)
|
||||||
{
|
{
|
||||||
/* check if cbSize is at least 22 bytes */
|
/* 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 (gotdx8 || wfx.wBitsPerSample <= 16 || wfx.wFormatTag == WAVE_FORMAT_IEEE_FLOAT)
|
||||||
{
|
{
|
||||||
if (wfx.wBitsPerSample > 16)
|
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? */
|
|| rc == DS_OK, /* driver dependent? */
|
||||||
"IDirectSound_CreateSoundBuffer() "
|
"IDirectSound_CreateSoundBuffer() "
|
||||||
"should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) "
|
"should have returned (DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL) "
|
||||||
|
|
Loading…
Reference in a new issue