diff --git a/src/sound/SESound.cpp b/src/sound/SESound.cpp index 8ac9853..b898635 100644 --- a/src/sound/SESound.cpp +++ b/src/sound/SESound.cpp @@ -180,7 +180,31 @@ void SESound::CompleteLoad() { } int32_t SESound::Load(const char* filename, int32_t a3, FMOD::SoundGroup* soundGroup1, FMOD::SoundGroup* soundGroup2, bool a6, bool a7, uint32_t a8, int32_t a9, uint32_t a10) { - // TODO + if (!SESound::s_Initialized) { + return 0; + } + return SESound::LoadDiskSound( + SESound::s_pGameSystem, + filename, + ((a3 != 0) + 1) | (0x40 | 0x8), // TODO FMOD_MODE + this, + soundGroup1, + soundGroup2, + a6, + a9, + a8, + a7, + a10, + 0, + 360.0f, + 360.0f, + 1.0f, + nullptr + ); +} + +int32_t SESound::LoadDiskSound(FMOD::System* system, const char* filename, FMOD_MODE mode, SESound* sound, FMOD::SoundGroup* soundGroup1, FMOD::SoundGroup* soundGroup2, bool a7, int32_t a8, uint32_t a9, int32_t a10, uint32_t decodeBufferSize, int32_t a12, float a13, float a14, float a15, float* a16) { + // TODO return 0; } diff --git a/src/sound/SESound.hpp b/src/sound/SESound.hpp index 37a34cb..b2d7836 100644 --- a/src/sound/SESound.hpp +++ b/src/sound/SESound.hpp @@ -7,23 +7,27 @@ class SESound { public: - // Static variables + // Public static variables static int32_t s_Initialized; static FMOD::System* s_pGameSystem; static uint32_t s_UniqueID; - // Static functions + // Public static functions static FMOD::SoundGroup* CreateSoundGroup(const char* name, int32_t maxAudible); static void Init(int32_t maxChannels, int32_t (*a2), int32_t enableReverb, int32_t enableSoftwareHRTF, int32_t* numChannels, int32_t* outputDriverIndex, const char* outputDriverName, void (*a8), int32_t a9); static int32_t IsInitialized(); static void Log_Write(int32_t line, const char* file, FMOD_RESULT result, const char* fmt, ...); - // Member variables - SESoundInternal* m_internal = nullptr; - - // Member functions + // Public member functions void CompleteLoad(); int32_t Load(const char* filename, int32_t a3, FMOD::SoundGroup* soundGroup1, FMOD::SoundGroup* soundGroup2, bool a6, bool a7, uint32_t a8, int32_t a9, uint32_t a10); + + private: + // Private static functions + static int32_t LoadDiskSound(FMOD::System* system, const char* filename, FMOD_MODE mode, SESound* sound, FMOD::SoundGroup* soundGroup1, FMOD::SoundGroup* soundGroup2, bool a7, int32_t a8, uint32_t a9, int32_t a10, uint32_t decodeBufferSize, int32_t a12, float a13, float a14, float a15, float* a16); + + // Private member variables + SESoundInternal* m_internal = nullptr; }; #endif