dsound: Fail to create a version 8 3d buffer with DSBCAPS_CTRLPAN.

Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2015-12-21 12:08:09 +01:00 committed by Alexandre Julliard
parent 86c097142b
commit 0e5dcc2c84
2 changed files with 5 additions and 1 deletions

View File

@ -542,6 +542,11 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer(
return DSERR_INVALIDPARAM;
}
if (from8 && (dsbd->dwFlags & DSBCAPS_CTRL3D) && (dsbd->dwFlags & DSBCAPS_CTRLPAN)) {
WARN("invalid parameter: DSBCAPS_CTRL3D and DSBCAPS_CTRLPAN cannot be used together\n");
return DSERR_INVALIDPARAM;
}
hres = IDirectSoundBufferImpl_Create(device, &dsb, dsbd);
if (dsb) {
*ppdsb = (IDirectSoundBuffer*)&dsb->IDirectSoundBuffer8_iface;

View File

@ -654,7 +654,6 @@ static HRESULT test_secondary8(LPGUID lpGuid, BOOL play,
/* Invalid flag combination */
bufdesc.dwFlags|=DSBCAPS_CTRLPAN;
rc=IDirectSound8_CreateSoundBuffer(dso,&bufdesc,&secondary,NULL);
todo_wine
ok(rc==DSERR_INVALIDPARAM,
"IDirectSound8_CreateSoundBuffer(secondary) should have "
"returned DSERR_INVALIDPARAM, returned %08x\n", rc);