dsound: Use a better name for IDirectSoundBufferImpl_Create().
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d51d55bab8
commit
bb72548f38
|
@ -983,19 +983,15 @@ static const IDirectSoundBuffer8Vtbl dsbvt =
|
|||
IDirectSoundBufferImpl_GetObjectInPath
|
||||
};
|
||||
|
||||
HRESULT IDirectSoundBufferImpl_Create(
|
||||
DirectSoundDevice * device,
|
||||
IDirectSoundBufferImpl **pdsb,
|
||||
LPCDSBUFFERDESC dsbd)
|
||||
HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *dsbd,
|
||||
IDirectSoundBuffer **buffer)
|
||||
{
|
||||
IDirectSoundBufferImpl *dsb;
|
||||
LPWAVEFORMATEX wfex = dsbd->lpwfxFormat;
|
||||
HRESULT err = DS_OK;
|
||||
DWORD capf = 0;
|
||||
|
||||
TRACE("(%p,%p,%p)\n",device,pdsb,dsbd);
|
||||
|
||||
*pdsb = NULL;
|
||||
TRACE("(%p,%p,%p)\n", device, dsbd, buffer);
|
||||
|
||||
if (dsbd->dwBufferBytes < DSBSIZE_MIN || dsbd->dwBufferBytes > DSBSIZE_MAX) {
|
||||
WARN("invalid parameter: dsbd->dwBufferBytes = %d\n", dsbd->dwBufferBytes);
|
||||
|
@ -1107,14 +1103,12 @@ HRESULT IDirectSoundBufferImpl_Create(
|
|||
|
||||
RtlInitializeResource(&dsb->lock);
|
||||
|
||||
/* register buffer if not primary */
|
||||
if (!(dsbd->dwFlags & DSBCAPS_PRIMARYBUFFER)) {
|
||||
err = DirectSoundDevice_AddBuffer(device, dsb);
|
||||
if (err == DS_OK)
|
||||
*pdsb = dsb;
|
||||
else
|
||||
IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
|
||||
}
|
||||
/* register buffer */
|
||||
err = DirectSoundDevice_AddBuffer(device, dsb);
|
||||
if (err == DS_OK)
|
||||
*buffer = (IDirectSoundBuffer*)&dsb->IDirectSoundBuffer8_iface;
|
||||
else
|
||||
IDirectSoundBuffer8_Release(&dsb->IDirectSoundBuffer8_iface);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -469,8 +469,6 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer(
|
|||
WARN("primarybuffer_create() failed\n");
|
||||
}
|
||||
} else {
|
||||
IDirectSoundBufferImpl * dsb;
|
||||
|
||||
if (dsbd->lpwfxFormat == NULL) {
|
||||
WARN("invalid parameter: dsbd->lpwfxFormat can't be NULL for "
|
||||
"secondary buffer\n");
|
||||
|
@ -547,9 +545,8 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer(
|
|||
return DSERR_INVALIDPARAM;
|
||||
}
|
||||
|
||||
hres = IDirectSoundBufferImpl_Create(device, &dsb, dsbd);
|
||||
if (dsb) {
|
||||
*ppdsb = (IDirectSoundBuffer*)&dsb->IDirectSoundBuffer8_iface;
|
||||
hres = secondarybuffer_create(device, dsbd, ppdsb);
|
||||
if (SUCCEEDED(hres)) {
|
||||
if (dsbd->dwFlags & DSBCAPS_LOCHARDWARE)
|
||||
device->drvcaps.dwFreeHwMixingAllBuffers--;
|
||||
} else
|
||||
|
|
|
@ -182,10 +182,8 @@ void put_stereo2quad(const IDirectSoundBufferImpl *dsb, DWORD pos, DWORD channel
|
|||
void put_mono2surround51(const IDirectSoundBufferImpl *dsb, DWORD pos, DWORD channel, float value) DECLSPEC_HIDDEN;
|
||||
void put_stereo2surround51(const IDirectSoundBufferImpl *dsb, DWORD pos, DWORD channel, float value) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT IDirectSoundBufferImpl_Create(
|
||||
DirectSoundDevice *device,
|
||||
IDirectSoundBufferImpl **ppdsb,
|
||||
LPCDSBUFFERDESC dsbd) DECLSPEC_HIDDEN;
|
||||
HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *dsbd,
|
||||
IDirectSoundBuffer **buffer) DECLSPEC_HIDDEN;
|
||||
HRESULT IDirectSoundBufferImpl_Duplicate(
|
||||
DirectSoundDevice *device,
|
||||
IDirectSoundBufferImpl **ppdsb,
|
||||
|
|
Loading…
Reference in New Issue