From ea04035f0db8fa990dd7ca8dd1a64f56bceb82e2 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Mon, 16 Jan 2023 22:52:39 -0500 Subject: persist voice settings, handle volume w/ no ssrc --- src/discord/voiceclient.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/discord/voiceclient.hpp') diff --git a/src/discord/voiceclient.hpp b/src/discord/voiceclient.hpp index 916d070..7bf4295 100644 --- a/src/discord/voiceclient.hpp +++ b/src/discord/voiceclient.hpp @@ -195,6 +195,9 @@ public: void SetServerID(Snowflake id); void SetUserID(Snowflake id); + // todo serialize + void SetUserVolume(Snowflake id, float volume); + [[nodiscard]] float GetUserVolume(Snowflake id) const; [[nodiscard]] std::optional GetSSRCOfUser(Snowflake id) const; // Is a websocket and udp connection fully established @@ -241,6 +244,7 @@ private: Snowflake m_user_id; std::unordered_map m_ssrc_map; + std::unordered_map m_user_volumes; std::array m_secret_key; -- cgit v1.2.3