diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2024-03-14 01:08:13 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2024-03-14 01:08:13 -0400 |
commit | 533157ece22c020dbf09d991b23d1cf4e5281e7a (patch) | |
tree | 2bf4aaf440307113cb0f36d45aa9783462985bc9 /src/discord/voicestate.hpp | |
parent | 019ae0428bc3ad878dffa6218eb03b96457d7dcb (diff) | |
download | abaddon-portaudio-533157ece22c020dbf09d991b23d1cf4e5281e7a.tar.gz abaddon-portaudio-533157ece22c020dbf09d991b23d1cf4e5281e7a.zip |
preliminary speaker checks
Diffstat (limited to 'src/discord/voicestate.hpp')
-rw-r--r-- | src/discord/voicestate.hpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/discord/voicestate.hpp b/src/discord/voicestate.hpp new file mode 100644 index 0000000..cc75b0c --- /dev/null +++ b/src/discord/voicestate.hpp @@ -0,0 +1,29 @@ +#pragma once +#include <cstdint> +#include <optional> +#include <string> +#include "misc/bitwise.hpp" + +// this is packed into a enum cuz it makes implementing tree models easier +enum class VoiceStateFlags : uint8_t { + Clear = 0, + Deaf = 1 << 0, + Mute = 1 << 1, + SelfDeaf = 1 << 2, + SelfMute = 1 << 3, + SelfStream = 1 << 4, + SelfVideo = 1 << 5, + Suppressed = 1 << 6, +}; + +struct PackedVoiceState { + VoiceStateFlags Flags; + std::optional<std::string> RequestToSpeakTimestamp; + + [[nodiscard]] bool IsSpeaker() const noexcept; +}; + +template<> +struct Bitwise<VoiceStateFlags> { + static const bool enable = true; +}; |