Andrew Eikum : dsound: Don' t require WAVE_FORMAT_EXTENSIBLE for non-16-bit formats.
Alexandre Julliard
julliard at winehq.org
Tue Sep 18 14:04:28 CDT 2012
Module: wine
Branch: master
Commit: b202b9f72dbdd3ff31ac732521d705c126feed6d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b202b9f72dbdd3ff31ac732521d705c126feed6d
Author: Andrew Eikum <aeikum at codeweavers.com>
Date: Mon Sep 17 15:44:06 2012 -0500
dsound: Don't require WAVE_FORMAT_EXTENSIBLE for non-16-bit formats.
Fix proposed by Andrew Nguyen.
---
dlls/dsound/dsound.c | 5 -----
dlls/dsound/tests/dsound.c | 2 +-
2 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index 023ef8b..a7a6f13 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -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 */
diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c
index f86464b..5b941a3 100644
--- a/dlls/dsound/tests/dsound.c
+++ b/dlls/dsound/tests/dsound.c
@@ -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) "
More information about the wine-cvs
mailing list