From 4569886186d37d7f611956090a800f052986b47d Mon Sep 17 00:00:00 2001 From: fallenoak Date: Sun, 23 Nov 2025 23:16:32 -0600 Subject: [PATCH] feat(sound): implement SESound::CompleteLoad --- src/sound/SESound.cpp | 8 +++++++- src/sound/SESoundInternal.cpp | 4 ++++ src/sound/SESoundInternal.hpp | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/sound/SESound.cpp b/src/sound/SESound.cpp index ab2766a..8ac9853 100644 --- a/src/sound/SESound.cpp +++ b/src/sound/SESound.cpp @@ -170,7 +170,13 @@ void SESound::Log_Write(int32_t line, const char* file, FMOD_RESULT result, cons } void SESound::CompleteLoad() { - // TODO + if (!this->m_internal) { + return; + } + + if (this->m_internal->m_type == 1 && this->m_internal->m_loaded) { + static_cast(this->m_internal)->CompleteNonBlockingLoad(); + } } 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) { diff --git a/src/sound/SESoundInternal.cpp b/src/sound/SESoundInternal.cpp index 943ff26..107ffb5 100644 --- a/src/sound/SESoundInternal.cpp +++ b/src/sound/SESoundInternal.cpp @@ -5,3 +5,7 @@ SESoundInternal::SESoundInternal() { // TODO this->m_uniqueID = SESound::s_UniqueID++; } + +void SEDiskSound::CompleteNonBlockingLoad() { + // TODO +} diff --git a/src/sound/SESoundInternal.hpp b/src/sound/SESoundInternal.hpp index a8d193b..780a745 100644 --- a/src/sound/SESoundInternal.hpp +++ b/src/sound/SESoundInternal.hpp @@ -48,6 +48,9 @@ class SEDiskSound : public SESoundInternal { FMOD::Sound* m_fmodSound = nullptr; // TODO SoundCacheNode* m_cacheNode = nullptr; + + // Member functions + void CompleteNonBlockingLoad(); }; class SEMemorySound : public SESoundInternal {