diff --git a/src/CxbxKrnl/EmuDSound.cpp b/src/CxbxKrnl/EmuDSound.cpp index 9a48a79c0..593799911 100755 --- a/src/CxbxKrnl/EmuDSound.cpp +++ b/src/CxbxKrnl/EmuDSound.cpp @@ -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); diff --git a/src/CxbxKrnl/EmuDSoundInline.hpp b/src/CxbxKrnl/EmuDSoundInline.hpp index 03b60ae87..1cdf8e58f 100644 --- a/src/CxbxKrnl/EmuDSoundInline.hpp +++ b/src/CxbxKrnl/EmuDSoundInline.hpp @@ -472,7 +472,7 @@ inline void DSoundBufferReplace( DSoundBufferCreate(pDSBufferDesc, pDSBufferNew); if (pDS3DBuffer != nullptr) { - DSound3DBufferCreate(pDSBuffer, pDS3DBufferNew); + DSound3DBufferCreate(pDSBufferNew, pDS3DBufferNew); } DSoundBufferTransferSettings(pDSBuffer, pDSBufferNew, pDS3DBuffer, pDS3DBufferNew);