mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(sound): add SESoundInternal::GetVolume
This commit is contained in:
parent
0f9a2afe2a
commit
08dc4513af
@ -13,6 +13,22 @@ SESoundInternal::SESoundInternal() {
|
|||||||
this->m_uniqueID = SESound::s_UniqueID++;
|
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() {
|
void SESoundInternal::Play() {
|
||||||
FMOD_RESULT result;
|
FMOD_RESULT result;
|
||||||
|
|
||||||
|
|||||||
@ -50,6 +50,7 @@ class SESoundInternal : public TSLinkedNode<SESoundInternal> {
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
SESoundInternal();
|
SESoundInternal();
|
||||||
|
float GetVolume();
|
||||||
void Play();
|
void Play();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user