Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
cqsp::engine::audio::AudioInterface Class Reference

#include <audiointerface.h>

Inheritance diagram for cqsp::engine::audio::AudioInterface:
cqsp::engine::audio::IAudioInterface

Public Member Functions

 AudioInterface ()
 
void Initialize () override
 
void Pause (bool to_pause) override
 
void PauseMusic (bool to_pause) override
 
std::string GetAudioVersion () override
 
void Destruct () override
 
void StartWorker () override
 
void RequestPlayAudio () override
 
void SetMusicVolume (float volume) override
 
void AddAudioClip (const std::string &key, cqsp::asset::AudioAsset *asset) override
 
void PlayAudioClip (const std::string &key) override
 
void PlayAudioClip (cqsp::asset::AudioAsset *asset, int channel) override
 
void SetChannelVolume (int channel, float gain) override
 
void OnFrame () override
 
 ~AudioInterface ()
 
std::unique_ptr< cqsp::asset::AudioAssetLoadWav (std::ifstream &input)
 
- Public Member Functions inherited from cqsp::engine::audio::IAudioInterface
virtual ~IAudioInterface ()=default
 

Public Attributes

ALCdevice * device
 
ALCcontext * context
 
ALboolean enumeration
 
std::unique_ptr< cqsp::asset::AudioAssetmusic_asset = nullptr
 
std::shared_ptr< spdlog::logger > logger
 
std::atomic_bool to_quit
 
Hjson::Value playlist
 

Private Member Functions

void PrintInformation ()
 
void InitListener ()
 
void InitALContext ()
 
std::unique_ptr< cqsp::asset::AudioAssetLoadNextFile ()
 

Private Attributes

std::map< std::string, cqsp::asset::AudioAsset * > assets
 
std::vector< std::unique_ptr< AudioChannel > > channels
 
float music_volume = 0
 
std::future< std::unique_ptr< cqsp::asset::AudioAsset > > audio_future
 Async load audio files More...
 

Static Private Attributes

static const int MUSIC_CHANNEL = 0
 
static const int UI_CHANNEL = 1
 

Constructor & Destructor Documentation

◆ AudioInterface()

AudioInterface::AudioInterface ( )

◆ ~AudioInterface()

cqsp::engine::audio::AudioInterface::~AudioInterface ( )

Member Function Documentation

◆ AddAudioClip()

void cqsp::engine::audio::AudioInterface::AddAudioClip ( const std::string &  key,
cqsp::asset::AudioAsset asset 
)
overridevirtual

◆ Destruct()

void AudioInterface::Destruct ( )
overridevirtual

◆ GetAudioVersion()

std::string AudioInterface::GetAudioVersion ( )
overridevirtual

◆ InitALContext()

void AudioInterface::InitALContext ( )
private

◆ Initialize()

void AudioInterface::Initialize ( )
overridevirtual

◆ InitListener()

void AudioInterface::InitListener ( )
private

◆ LoadNextFile()

std::unique_ptr< AudioAsset > cqsp::engine::audio::AudioInterface::LoadNextFile ( )
private

◆ LoadWav()

std::unique_ptr< AudioAsset > AudioInterface::LoadWav ( std::ifstream &  input)

◆ OnFrame()

void cqsp::engine::audio::AudioInterface::OnFrame ( )
overridevirtual

◆ Pause()

void AudioInterface::Pause ( bool  to_pause)
overridevirtual

◆ PauseMusic()

void AudioInterface::PauseMusic ( bool  to_pause)
overridevirtual

◆ PlayAudioClip() [1/2]

void cqsp::engine::audio::AudioInterface::PlayAudioClip ( const std::string &  key)
overridevirtual

◆ PlayAudioClip() [2/2]

void cqsp::engine::audio::AudioInterface::PlayAudioClip ( cqsp::asset::AudioAsset asset,
int  channel 
)
overridevirtual

◆ PrintInformation()

void AudioInterface::PrintInformation ( )
private

◆ RequestPlayAudio()

void AudioInterface::RequestPlayAudio ( )
overridevirtual

◆ SetChannelVolume()

void cqsp::engine::audio::AudioInterface::SetChannelVolume ( int  channel,
float  gain 
)
overridevirtual

◆ SetMusicVolume()

void AudioInterface::SetMusicVolume ( float  volume)
overridevirtual

◆ StartWorker()

void AudioInterface::StartWorker ( )
overridevirtual

Member Data Documentation

◆ assets

std::map<std::string, cqsp::asset::AudioAsset *> cqsp::engine::audio::AudioInterface::assets
private

◆ audio_future

std::future<std::unique_ptr<cqsp::asset::AudioAsset> > cqsp::engine::audio::AudioInterface::audio_future
private

Async load audio files

◆ channels

std::vector<std::unique_ptr<AudioChannel> > cqsp::engine::audio::AudioInterface::channels
private

◆ context

ALCcontext* cqsp::engine::audio::AudioInterface::context

◆ device

ALCdevice* cqsp::engine::audio::AudioInterface::device

◆ enumeration

ALboolean cqsp::engine::audio::AudioInterface::enumeration

◆ logger

std::shared_ptr<spdlog::logger> cqsp::engine::audio::AudioInterface::logger

◆ music_asset

std::unique_ptr<cqsp::asset::AudioAsset> cqsp::engine::audio::AudioInterface::music_asset = nullptr

◆ MUSIC_CHANNEL

const int cqsp::engine::audio::AudioInterface::MUSIC_CHANNEL = 0
staticprivate

◆ music_volume

float cqsp::engine::audio::AudioInterface::music_volume = 0
private

◆ playlist

Hjson::Value cqsp::engine::audio::AudioInterface::playlist

◆ to_quit

std::atomic_bool cqsp::engine::audio::AudioInterface::to_quit

◆ UI_CHANNEL

const int cqsp::engine::audio::AudioInterface::UI_CHANNEL = 1
staticprivate

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