Fix DS 3DBuffer Creation From Correct DS Buffer
Plus remove unnecessary temporary buffer creation.
This commit is contained in:
parent
8800a493db
commit
10736eeb45
|
@ -1378,7 +1378,7 @@ HRESULT WINAPI XTL::EMUPATCH(IDirectSoundBuffer_Play)
|
|||
|
||||
DSoundBufferCreate(emuBufferDescRegion, pThis->EmuDirectSoundBuffer8Region);
|
||||
if (pThis->EmuDirectSound3DBuffer8 != nullptr) {
|
||||
DSound3DBufferCreate(pThis->EmuDirectSoundBuffer8, pThis->EmuDirectSound3DBuffer8Region);
|
||||
DSound3DBufferCreate(pThis->EmuDirectSoundBuffer8Region, pThis->EmuDirectSound3DBuffer8Region);
|
||||
}
|
||||
DSoundBufferTransferSettings(pThis->EmuDirectSoundBuffer8, pThis->EmuDirectSoundBuffer8Region,
|
||||
pThis->EmuDirectSound3DBuffer8, pThis->EmuDirectSound3DBuffer8Region);
|
||||
|
@ -1603,10 +1603,6 @@ HRESULT WINAPI XTL::EMUPATCH(DirectSoundCreateStream)
|
|||
|
||||
DbgPrintf("EmuDSound: DirectSoundCreateStream, *ppStream := 0x%.08X\n", *ppStream);
|
||||
|
||||
//Temporary creation since we need IDIRECTSOUNDBUFFER8, not IDIRECTSOUNDBUFFER class.
|
||||
LPDIRECTSOUNDBUFFER pTempBuffer;
|
||||
HRESULT hRet = g_pDSound8->CreateSoundBuffer(pDSBufferDesc, &pTempBuffer, NULL);
|
||||
|
||||
DSoundBufferCreate(pDSBufferDesc, (*ppStream)->EmuDirectSoundBuffer8);
|
||||
if (pDSBufferDesc->dwFlags & DSBCAPS_CTRL3D) {
|
||||
DSound3DBufferCreate((*ppStream)->EmuDirectSoundBuffer8, (*ppStream)->EmuDirectSound3DBuffer8);
|
||||
|
|
|
@ -472,7 +472,7 @@ inline void DSoundBufferReplace(
|
|||
DSoundBufferCreate(pDSBufferDesc, pDSBufferNew);
|
||||
|
||||
if (pDS3DBuffer != nullptr) {
|
||||
DSound3DBufferCreate(pDSBuffer, pDS3DBufferNew);
|
||||
DSound3DBufferCreate(pDSBufferNew, pDS3DBufferNew);
|
||||
}
|
||||
|
||||
DSoundBufferTransferSettings(pDSBuffer, pDSBufferNew, pDS3DBuffer, pDS3DBufferNew);
|
||||
|
|
Loading…
Reference in New Issue