diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-18 17:36:51 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-18 17:36:51 +1000 |
commit | 6e1d29fe861ef5a81c5458cd8ae68d09f36e28c3 (patch) | |
tree | 36fb8a412649f1e749e2b9fc0268e80bc05251fb /source/frontend/StarVoice.hpp | |
parent | 34bb0b54222c1c0f3450c56e76f89f192d77374b (diff) |
Provide speaker info to HUD indicators
Diffstat (limited to 'source/frontend/StarVoice.hpp')
-rw-r--r-- | source/frontend/StarVoice.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/frontend/StarVoice.hpp b/source/frontend/StarVoice.hpp index 38964b0..d6bc467 100644 --- a/source/frontend/StarVoice.hpp +++ b/source/frontend/StarVoice.hpp @@ -81,9 +81,10 @@ public: Mutex mutex; int64_t lastReceiveTime = 0; + int64_t lastPlayTime = 0; atomic<bool> muted = false; - atomic<bool> playing = false; + atomic<bool> playing = 0; atomic<float> decibelLevel = 0.0f; atomic<Array<float, 2>> channelVolumes = Array<float, 2>::filled(1.0f); @@ -118,7 +119,9 @@ public: // Sets the local speaker ID and returns the local speaker. Must be called upon loading into a world. SpeakerPtr setLocalSpeaker(SpeakerId speakerId); + SpeakerPtr localSpeaker(); SpeakerPtr speaker(SpeakerId speakerId); + List<Voice::SpeakerPtr> speakers(bool onlyPlaying); // Called when receiving input audio data from SDL, on its own thread. void readAudioData(uint8_t* stream, int len); |