Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
VoiceChatPacket.hpp File Reference
#include <bit>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <span>
#include <vector>
Include dependency graph for VoiceChatPacket.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  monopoly::voicechat::packet::WaveFormat
 
struct  monopoly::voicechat::packet::Event
 

Namespaces

namespace  monopoly
 
namespace  monopoly::voicechat
 
namespace  monopoly::voicechat::packet
 
namespace  monopoly::voicechat::packet::detail
 

Typedefs

using monopoly::voicechat::packet::EventSink = bool(*)(const Event &, std::uint32_t sourceId)
 

Enumerations

enum class  monopoly::voicechat::packet::EventKind : std::uint8_t {
  monopoly::voicechat::packet::Start , monopoly::voicechat::packet::Dimensions , monopoly::voicechat::packet::Volume , monopoly::voicechat::packet::Data ,
  monopoly::voicechat::packet::DataAfterSilence , monopoly::voicechat::packet::Position , monopoly::voicechat::packet::Stop
}
 
enum class  monopoly::voicechat::packet::ParseStatus : std::uint8_t { monopoly::voicechat::packet::Ok , monopoly::voicechat::packet::Malformed , monopoly::voicechat::packet::SinkRejected }
 

Functions

constexpr std::uint32_t monopoly::voicechat::packet::fourCC (char a, char b, char c, char d) noexcept
 
std::uint16_t monopoly::voicechat::packet::readLe16 (std::span< const std::uint8_t > bytes, std::size_t offset) noexcept
 
std::uint32_t monopoly::voicechat::packet::readLe32 (std::span< const std::uint8_t > bytes, std::size_t offset) noexcept
 
WaveFormat monopoly::voicechat::packet::readWaveFormat (std::span< const std::uint8_t > bytes) noexcept
 
ParseStatus monopoly::voicechat::packet::emit (EventSink sink, std::uint32_t sourceId, const Event &event) noexcept
 
ParseStatus monopoly::voicechat::packet::parseChatSubchunks (std::span< const std::uint8_t > bytes, std::uint32_t sourceId, EventSink sink) noexcept
 
ParseStatus monopoly::voicechat::packet::parse (std::span< const std::uint8_t > bytes, std::uint32_t sourceId, EventSink sink=nullptr) noexcept
 
void monopoly::voicechat::packet::detail::appendLe16 (std::vector< std::uint8_t > &bytes, std::uint16_t value)
 
void monopoly::voicechat::packet::detail::appendLe32 (std::vector< std::uint8_t > &bytes, std::uint32_t value)
 
bool monopoly::voicechat::packet::detail::appendChunk (std::vector< std::uint8_t > &bytes, std::uint32_t id, std::span< const std::uint8_t > payload)
 
bool monopoly::voicechat::packet::makeStartPacket (WaveFormat format, std::span< const std::uint8_t > extraFormatBytes, std::uint32_t dimensions, std::uint32_t volume, std::vector< std::uint8_t > &packet)
 
bool monopoly::voicechat::packet::makeDataPacket (std::span< const std::uint8_t > data, bool afterSilence, std::vector< std::uint8_t > &packet)
 
bool monopoly::voicechat::packet::makeStopPacket (std::vector< std::uint8_t > &packet)
 
bool monopoly::voicechat::packet::makePositionPacket (std::span< const float > coordinates, std::vector< std::uint8_t > &packet)
 

Variables

constexpr std::size_t monopoly::voicechat::packet::MaximumPacketBytes