From 8c1ebb8d4af7fad4d0a6a7ec77d9a76fbc72af87 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Tue, 25 Nov 2025 20:06:36 -0600 Subject: [PATCH] feat(sound): add SESound::Play --- src/sound/SESound.cpp | 14 ++++++++++++++ src/sound/SESound.hpp | 1 + src/sound/SI2.cpp | 4 ++++ 3 files changed, 19 insertions(+) diff --git a/src/sound/SESound.cpp b/src/sound/SESound.cpp index f9ec617..d96ba28 100644 --- a/src/sound/SESound.cpp +++ b/src/sound/SESound.cpp @@ -505,3 +505,17 @@ int32_t SESound::Load(const char* filename, int32_t a3, FMOD::SoundGroup* soundG nullptr ); } + +void SESound::Play() { + if (!this->m_internal) { + return; + } + + // TODO volume + + this->m_internal->m_playing = 1; + + if (this->m_internal->m_fmodChannel) { + this->m_internal->Play(); + } +} diff --git a/src/sound/SESound.hpp b/src/sound/SESound.hpp index d7c06ff..b0d742f 100644 --- a/src/sound/SESound.hpp +++ b/src/sound/SESound.hpp @@ -35,6 +35,7 @@ class SESound { // 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); + void Play(); private: // Private static functions diff --git a/src/sound/SI2.cpp b/src/sound/SI2.cpp index a839407..7f84bc2 100644 --- a/src/sound/SI2.cpp +++ b/src/sound/SI2.cpp @@ -367,6 +367,10 @@ int32_t SI2::PlaySoundKit(int32_t id, int32_t a2, void* handle, SoundKitProperti // TODO + sound->Play(); + + // TODO + return 0; }