From 68d482536034d7241e4cddcc33fbeca5176f9e26 Mon Sep 17 00:00:00 2001 From: jarupxx Date: Sun, 19 Feb 2017 09:24:51 +0900 Subject: [PATCH] DSound: Added stub for DirectSound_CDirectSoundStream_SetLFO Based on DXBX. Used to Innocent Tears. --- src/CxbxKrnl/EmuDSound.cpp | 25 ++++++++++++++++++++ src/CxbxKrnl/EmuDSound.h | 9 +++++++ src/CxbxKrnl/HLEDataBase/DSound.1.0.4627.inl | 22 +++++++++++++++++ 3 files changed, 56 insertions(+) diff --git a/src/CxbxKrnl/EmuDSound.cpp b/src/CxbxKrnl/EmuDSound.cpp index dec45c03a..d44b3b3f8 100644 --- a/src/CxbxKrnl/EmuDSound.cpp +++ b/src/CxbxKrnl/EmuDSound.cpp @@ -2740,6 +2740,31 @@ HRESULT WINAPI XTL::EMUPATCH(IDirectSoundBuffer_SetLFO) return S_OK; } +// ****************************************************************** +// * patch: DirectSound_CDirectSoundStream_SetLFO +// ****************************************************************** +HRESULT WINAPI XTL::EMUPATCH(DirectSound_CDirectSoundStream_SetLFO) +( + LPDIRECTSOUNDBUFFER pThis, + LPCDSLFODESC pLFODesc +) +{ + + + DbgPrintf("EmuDSound: EmuDirectSound_CDirectSoundStream_SetLFO\n" + "(\n" + " pThis : 0x%.08X\n" + " pLFODesc : 0x%.08X\n" + ");\n", + pThis, pLFODesc); + + // TODO: Implement + + EmuWarning("EmuDirectSound_CDirectSoundStream_SetLFO not yet implemented!"); + + return S_OK; +} + // ****************************************************************** // * patch: XAudioCreateAdpcmFormat // ****************************************************************** diff --git a/src/CxbxKrnl/EmuDSound.h b/src/CxbxKrnl/EmuDSound.h index b7506ca66..f9bd07555 100644 --- a/src/CxbxKrnl/EmuDSound.h +++ b/src/CxbxKrnl/EmuDSound.h @@ -1206,6 +1206,15 @@ HRESULT WINAPI EMUPATCH(IDirectSoundBuffer_SetLFO) LPCDSLFODESC pLFODesc ); +// ****************************************************************** +// * patch: DirectSound_CDirectSoundStream_SetLFO +// ****************************************************************** +HRESULT WINAPI EMUPATCH(DirectSound_CDirectSoundStream_SetLFO) +( + LPDIRECTSOUNDBUFFER pThis, + LPCDSLFODESC pLFODesc +); + // ****************************************************************** // * patch: XAudioCreateAdpcmFormat // ****************************************************************** diff --git a/src/CxbxKrnl/HLEDataBase/DSound.1.0.4627.inl b/src/CxbxKrnl/HLEDataBase/DSound.1.0.4627.inl index 862d367e5..16ecea23b 100644 --- a/src/CxbxKrnl/HLEDataBase/DSound.1.0.4627.inl +++ b/src/CxbxKrnl/HLEDataBase/DSound.1.0.4627.inl @@ -2920,6 +2920,27 @@ OOVPA_XREF(IDirectSoundBuffer_SetLFO, 4627, 8, { 0x1A, 0x08 }, OOVPA_END; +// ****************************************************************** +// * DirectSound::CDirectSoundStream::SetLFO +// ****************************************************************** +OOVPA_XREF(DirectSound_CDirectSoundStream_SetLFO, 4627, 10, + + XRefNoSaveIndex, + XRefOne) + + XREF_ENTRY( 0x36, XREF_DirectSound_CDirectSoundVoice_SetLFO ), + + { 0x0C, 0x00 }, + { 0x0F, 0xF0 }, + { 0x12, 0x85 }, + { 0x15, 0x0B }, + { 0x3A, 0x85 }, + { 0x3D, 0xF8 }, + { 0x40, 0x68 }, + { 0x4F, 0xC2 }, + { 0x50, 0x08 }, +OOVPA_END; + // ****************************************************************** // * DirectSound::CDirectSoundStream::SetPitch // ****************************************************************** @@ -3139,6 +3160,7 @@ OOVPATable DSound_4627[] = { REGISTER_OOVPA(DirectSound_CDirectSoundVoice_SetLFO, 4627, XREF), REGISTER_OOVPA(DirectSound_CDirectSoundBuffer_SetLFO, 4627, XREF), REGISTER_OOVPA(IDirectSoundBuffer_SetLFO, 4627, PATCH), + REGISTER_OOVPA(DirectSound_CDirectSoundStream_SetLFO, 4627, PATCH), REGISTER_OOVPA(DirectSound_CDirectSoundStream_SetPitch, 4627, PATCH), REGISTER_OOVPA(DirectSound_CDirectSoundBuffer_SetVolume, 4627, XREF), REGISTER_OOVPA(IDirectSoundBuffer_SetVolume, 4627, PATCH),