Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend/StarVoice.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-07-19 18:15:49 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-07-19 18:15:49 +1000
commit3cdbf8bf014f72827906ef1ba1715845a95e9919 (patch)
treeefdc5d2583494bbb1bf00a0ca273918ba25c3e18 /source/frontend/StarVoice.hpp
parenta9dac1b2dfedcf8a4c4b0322789d30633af80f8b (diff)
Lua functions for updating Voice settings, improve loudness visualization
Diffstat (limited to 'source/frontend/StarVoice.hpp')
-rw-r--r--source/frontend/StarVoice.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/frontend/StarVoice.hpp b/source/frontend/StarVoice.hpp
index 18e677a..236dfb0 100644
--- a/source/frontend/StarVoice.hpp
+++ b/source/frontend/StarVoice.hpp
@@ -82,11 +82,13 @@ public:
int64_t lastReceiveTime = 0;
int64_t lastPlayTime = 0;
+ float smoothDb = -96.0f;
+ Array<float, 10> dbHistory = Array<float, 10>::filled(0);
atomic<bool> muted = false;
atomic<bool> playing = 0;
- atomic<float> decibelLevel = 0.0f;
- atomic<Array<float, 2>> channelVolumes = Array<float, 2>::filled(1.0f);
+ atomic<float> decibelLevel = -96.0f;
+ atomic<Array<float, 2>> channelVolumes = Array<float, 2>::filled(1);
unsigned int minimumPlaySamples = 4096;
@@ -133,6 +135,7 @@ public:
void update(PositionalAttenuationFunction positionalAttenuationFunction = {});
void setDeviceName(Maybe<String> device);
+ StringList availableDevices();
int send(DataStreamBuffer& out, size_t budget);
bool receive(SpeakerPtr speaker, std::string_view view);