group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
VoiceChatSystem Class Reference

#include <VoiceChatSystem.hpp>

Collaboration diagram for VoiceChatSystem:
[legend]

Classes

struct  SpeakingState
struct  RemoteSpeaker

Public Member Functions

bool init (std::string_view recordingDeviceName={})
void quit ()
void setRecordingDeviceName (std::string_view name)
void setPushToTalk (bool active)
void enqueueFrame (const net::voice::ServerVoiceFrame &frame)
void update (float dt, Client &client, const Registry &registry, SfxSystem &sfx)
bool captureReady () const noexcept
bool transmitting () const noexcept
const std::vector< SpeakingState > & speaking () const noexcept

Private Member Functions

bool lookupSpeakerTransform (const Registry &registry, ClientId speaker, glm::vec3 &position, glm::vec3 &velocity) const
void drainSpeaker (ClientId speaker, RemoteSpeaker &remote, const Registry &registry, SfxSystem &sfx)

Private Attributes

VoiceCapture capture_
std::unordered_map< int, RemoteSpeakerspeakers_
std::vector< SpeakingStatespeaking_
std::vector< net::voice::ServerVoiceFramependingFrames_
std::mutex pendingMutex_
bool captureInitialized_ = false

Member Function Documentation

◆ captureReady()

bool VoiceChatSystem::captureReady ( ) const
inlinenodiscardnoexcept

◆ drainSpeaker()

void VoiceChatSystem::drainSpeaker ( ClientId speaker,
RemoteSpeaker & remote,
const Registry & registry,
SfxSystem & sfx )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ enqueueFrame()

void VoiceChatSystem::enqueueFrame ( const net::voice::ServerVoiceFrame & frame)

◆ init()

bool VoiceChatSystem::init ( std::string_view recordingDeviceName = {})

◆ lookupSpeakerTransform()

bool VoiceChatSystem::lookupSpeakerTransform ( const Registry & registry,
ClientId speaker,
glm::vec3 & position,
glm::vec3 & velocity ) const
nodiscardprivate
Here is the caller graph for this function:

◆ quit()

void VoiceChatSystem::quit ( )

◆ setPushToTalk()

void VoiceChatSystem::setPushToTalk ( bool active)

◆ setRecordingDeviceName()

void VoiceChatSystem::setRecordingDeviceName ( std::string_view name)

◆ speaking()

const std::vector< SpeakingState > & VoiceChatSystem::speaking ( ) const
inlinenodiscardnoexcept

◆ transmitting()

bool VoiceChatSystem::transmitting ( ) const
inlinenodiscardnoexcept

◆ update()

void VoiceChatSystem::update ( float dt,
Client & client,
const Registry & registry,
SfxSystem & sfx )
Here is the call graph for this function:

Member Data Documentation

◆ capture_

VoiceCapture VoiceChatSystem::capture_
private

◆ captureInitialized_

bool VoiceChatSystem::captureInitialized_ = false
private

◆ pendingFrames_

std::vector<net::voice::ServerVoiceFrame> VoiceChatSystem::pendingFrames_
private

◆ pendingMutex_

std::mutex VoiceChatSystem::pendingMutex_
private

◆ speakers_

std::unordered_map<int, RemoteSpeaker> VoiceChatSystem::speakers_
private

◆ speaking_

std::vector<SpeakingState> VoiceChatSystem::speaking_
private

The documentation for this class was generated from the following files: