group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
VoiceProtocol.hpp File Reference

Bounded Opus voice-frame packet helpers. More...

#include "ecs/components/ClientId.hpp"
#include <cstdint>
#include <optional>
#include <span>
#include <vector>
Include dependency graph for VoiceProtocol.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  net::voice::ClientVoiceFrame
struct  net::voice::ClientVoiceFrameView
struct  net::voice::ServerVoiceFrame

Namespaces

namespace  net
namespace  net::voice

Functions

std::vector< std::uint8_t > net::voice::encodeClientFrame (std::uint16_t sequence, std::uint8_t frameMs, std::span< const std::uint8_t > opus)
std::vector< std::uint8_t > net::voice::encodeServerFrame (ClientId speaker, std::uint16_t sequence, std::uint8_t frameMs, std::span< const std::uint8_t > opus)
std::optional< ClientVoiceFrameViewnet::voice::decodeClientFrameView (std::span< const std::uint8_t > payload)
std::optional< ClientVoiceFramenet::voice::decodeClientFrame (std::span< const std::uint8_t > payload)
std::optional< ServerVoiceFramenet::voice::decodeServerFrame (std::span< const std::uint8_t > payload)

Variables

constexpr int net::voice::k_sampleRate = 48000
constexpr int net::voice::k_channels = 1
constexpr std::uint8_t net::voice::k_frameMs = 20
constexpr std::uint16_t net::voice::k_maxOpusBytes = 512

Detailed Description

Bounded Opus voice-frame packet helpers.