Rename DSoundBufferUnlockXboxAdpcm
Changed DSoundBufferUnlockXboxAdpcm to DSoundBufferXboxAdpcmDecoder since it is performing a decode in locked memory and new buffer.
This commit is contained in:
parent
41b9a32d7b
commit
6acc0483d4
|
@ -994,7 +994,7 @@ HRESULT WINAPI XTL::EMUPATCH(IDirectSoundBuffer_SetBufferData)
|
|||
ResizeIDirectSoundBuffer(pThis->EmuDirectSoundBuffer8, pThis->EmuBufferDesc, pThis->EmuFlags, dwBufferBytes, pThis->EmuDirectSound3DBuffer8);
|
||||
|
||||
if (pThis->EmuFlags & DSB_FLAG_ADPCM) {
|
||||
DSoundBufferUnlockXboxAdpcm(pThis->EmuDirectSoundBuffer8, pThis->EmuBufferDesc, pvBufferData, dwBufferBytes, NULL, 0, false);
|
||||
DSoundBufferXboxAdpcmDecoder(pThis->EmuDirectSoundBuffer8, pThis->EmuBufferDesc, pvBufferData, dwBufferBytes, NULL, 0, false);
|
||||
}
|
||||
|
||||
leaveCriticalSection;
|
||||
|
@ -1082,7 +1082,7 @@ HRESULT WINAPI XTL::EMUPATCH(IDirectSoundBuffer_Lock)
|
|||
if (pThis->EmuLockPtr1 != 0) {
|
||||
//TODO: This is not really recommended place since new sound data are going to be replace anyway.
|
||||
if (pThis->EmuFlags & DSB_FLAG_ADPCM) {
|
||||
DSoundBufferUnlockXboxAdpcm(pThis->EmuDirectSoundBuffer8,
|
||||
DSoundBufferXboxAdpcmDecoder(pThis->EmuDirectSoundBuffer8,
|
||||
pThis->EmuBufferDesc,
|
||||
pThis->EmuLockPtr1,
|
||||
pThis->EmuLockBytes1,
|
||||
|
@ -1360,7 +1360,7 @@ HRESULT WINAPI XTL::EMUPATCH(IDirectSoundBuffer_Play)
|
|||
// close any existing locks
|
||||
if (pThis->EmuLockPtr1 != 0) {
|
||||
if (pThis->EmuFlags & DSB_FLAG_ADPCM) {
|
||||
DSoundBufferUnlockXboxAdpcm(pThis->EmuDirectSoundBuffer8,
|
||||
DSoundBufferXboxAdpcmDecoder(pThis->EmuDirectSoundBuffer8,
|
||||
pThis->EmuBufferDesc,
|
||||
pThis->EmuLockPtr1,
|
||||
pThis->EmuLockBytes1,
|
||||
|
@ -1851,7 +1851,7 @@ HRESULT WINAPI XTL::EMUPATCH(CDirectSoundStream_Process)
|
|||
//NOTE : XADPCM audio has occurred in Rayman Arena first intro video, all other title's intro videos are PCM so far.
|
||||
if (pThis->EmuFlags & DSB_FLAG_ADPCM) {
|
||||
|
||||
DSoundBufferUnlockXboxAdpcm(pThis->EmuDirectSoundBuffer8,
|
||||
DSoundBufferXboxAdpcmDecoder(pThis->EmuDirectSoundBuffer8,
|
||||
pThis->EmuBufferDesc,
|
||||
pThis->EmuBuffer,
|
||||
pInputBuffer->dwMaxSize,
|
||||
|
|
|
@ -49,7 +49,7 @@ CRITICAL_SECTION g_DSoundCriticalSection;
|
|||
#define leaveCriticalSection LeaveCriticalSection(&g_DSoundCriticalSection)
|
||||
|
||||
//Xbox Audio Decoder by blueshogun96 and revised by RadWolfie
|
||||
void DSoundBufferUnlockXboxAdpcm(
|
||||
void DSoundBufferXboxAdpcmDecoder(
|
||||
IDirectSoundBuffer* pDSBuffer,
|
||||
DSBUFFERDESC* pDSBufferDesc,
|
||||
LPVOID pAudioPtr,
|
||||
|
@ -386,7 +386,7 @@ inline void DSoundBufferUpdate(
|
|||
// unlock existing lock
|
||||
if (pLockPtr1 != 0) {
|
||||
if (dwFlags & DSB_FLAG_ADPCM) {
|
||||
DSoundBufferUnlockXboxAdpcm(pThis,
|
||||
DSoundBufferXboxAdpcmDecoder(pThis,
|
||||
pDSBufferDesc,
|
||||
pLockPtr1,
|
||||
dwLockBytes1,
|
||||
|
@ -399,7 +399,7 @@ inline void DSoundBufferUpdate(
|
|||
pLockPtr1 = 0;
|
||||
}
|
||||
if (dwFlags & DSB_FLAG_ADPCM) {
|
||||
DSoundBufferUnlockXboxAdpcm(pThis, pDSBufferDesc, pBuffer, pDSBufferDesc->dwBufferBytes, 0, 0, false);
|
||||
DSoundBufferXboxAdpcmDecoder(pThis, pDSBufferDesc, pBuffer, pDSBufferDesc->dwBufferBytes, 0, 0, false);
|
||||
} else {
|
||||
HRESULT hRet = pThis->Lock(0, pDSBufferDesc->dwBufferBytes, &pAudioPtr, &dwAudioBytes, &pAudioPtr2, &dwAudioBytes2, 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue