From 08dc4513af8d0e50300dac50246bbffdc45b1e8f Mon Sep 17 00:00:00 2001 From: fallenoak Date: Wed, 26 Nov 2025 23:28:05 -0600 Subject: [PATCH] feat(sound): add SESoundInternal::GetVolume --- src/sound/SESoundInternal.cpp | 16 ++++++++++++++++ src/sound/SESoundInternal.hpp | 1 + 2 files changed, 17 insertions(+) diff --git a/src/sound/SESoundInternal.cpp b/src/sound/SESoundInternal.cpp index ae14fc0..bf6ff4b 100644 --- a/src/sound/SESoundInternal.cpp +++ b/src/sound/SESoundInternal.cpp @@ -13,6 +13,22 @@ SESoundInternal::SESoundInternal() { this->m_uniqueID = SESound::s_UniqueID++; } +float SESoundInternal::GetVolume() { + if (!SESound::s_Initialized) { + return 0.0f; + } + + float volume = this->m_volume; + + if (this->m_fadeIn || this->m_fadeOut) { + volume *= this->m_fadeVolume; + } + + // TODO + + return volume; +} + void SESoundInternal::Play() { FMOD_RESULT result; diff --git a/src/sound/SESoundInternal.hpp b/src/sound/SESoundInternal.hpp index 8b7e649..3d27459 100644 --- a/src/sound/SESoundInternal.hpp +++ b/src/sound/SESoundInternal.hpp @@ -50,6 +50,7 @@ class SESoundInternal : public TSLinkedNode { // Member functions SESoundInternal(); + float GetVolume(); void Play(); };