#include <SoundEngine.h>
|
static snd_err | Create () |
| Creates the SoundEngine. More...
|
|
static snd_err | Update () |
| Updates this sound engine, processing commands. More...
|
|
static snd_err | SendData (ThreadCommand val) |
| Sends a command to the audio thread. More...
|
|
static snd_err | SendDataA2G (ThreadCommand val) |
| Sends a command from audio thread to game. More...
|
|
static CircularData * | GetG2ABuff () |
| Gets g 2 a buffer. More...
|
|
static CircularData * | GetA2GBuff () |
| Gets a 2 g buffer. More...
|
|
static snd_err | CreateSoundCall (SoundCall *&in, SoundCallID id, bool _3D) |
| Creates sound call. More...
|
|
static snd_err | CreateSoundCall (SoundCall *&in, SoundCallID id, int priority) |
| Creates sound call. More...
|
|
static snd_err | ReturnSoundCall (SoundCall *in) |
| Returns sound call. More...
|
|
static snd_err | FindSoundCall (SoundCall *&out, unsigned int handle) |
| Searches for the first sound call. More...
|
|
static snd_err | Terminate () |
| Gets the terminate. More...
|
|
static snd_err | LoadScript (std::string path, SoundCallID id, void(*cb)(void)=nullptr) |
| Loads a script. More...
|
|
static snd_err | LoadSound (std::string path, SoundCallID id, void(*cb)(void)=nullptr) |
| Loads a sound. More...
|
|
|
| SoundEngine () |
|
| ~SoundEngine () |
|
snd_err | privCreateSoundCall (SoundCall *&in, SoundCallID id, int priority) |
|
snd_err | privUpdate () |
|
snd_err | privSendData (ThreadCommand val) |
|
snd_err | privSendDataA2G (ThreadCommand val) |
|
snd_err | privCreate () |
|
snd_err | privTerminate () |
|
snd_err | privCreateSoundCall (SoundCall *&in, SoundCallID id, bool _3D) |
|
snd_err | privReturnSoundCall (SoundCall *in) |
|
snd_err | privFindSoundCall (SoundCall *&out, unsigned int handle) |
|
snd_err | privLoadScript (std::string path, SoundCallID id, void(*cb)(void)) |
|
snd_err | privLoadSound (std::string path, SoundCallID id, void(*cb)(void)) |
|
snd_err | privLoadScript (const char *path, SoundCallID id, void(*cb)(void)) |
|
CircularData * | privGetG2ABuff () |
|
CircularData * | privGetA2GBuff () |
|
◆ SoundEngine() [1/2]
◆ SoundEngine() [2/2]
SoundEngine::SoundEngine |
( |
| ) |
|
|
private |
◆ ~SoundEngine()
SoundEngine::~SoundEngine |
( |
| ) |
|
|
private |
◆ Create()
static snd_err SoundEngine::Create |
( |
| ) |
|
|
inlinestatic |
Creates the SoundEngine.
- Author
- Jack Campbell
- Date
- 6/1/2017
- Returns
- A snd_err.
◆ CreateSoundCall() [1/2]
Creates sound call.
- Author
- Jack Campbell
- Date
- 6/1/2017
- Parameters
-
[in,out] | in | [in,out] If non-null, the in. |
| id | The identifier. |
| _3D | True to 3D. |
- Returns
- The new sound call.
◆ CreateSoundCall() [2/2]
Creates sound call.
- Author
- Jack Campbell
- Date
- 6/1/2017
- Parameters
-
[in,out] | in | [in,out] If non-null, the in. |
| id | The identifier. |
| priority | The priority. |
- Returns
- The new sound call.
◆ FindSoundCall()
static snd_err SoundEngine::FindSoundCall |
( |
SoundCall *& |
out, |
|
|
unsigned int |
handle |
|
) |
| |
|
inlinestatic |
Searches for the first sound call.
- Author
- Jack Campbell
- Date
- 6/1/2017
- Parameters
-
[in,out] | out | [in,out] If non-null, the out. |
| handle | The handle. |
- Returns
- The found sound call.
◆ GetA2GBuff()
static CircularData SoundEngine::* SoundEngine::GetA2GBuff |
( |
| ) |
|
|
inlinestatic |
Gets a 2 g buffer.
- Author
- Jack Campbell
- Date
- 6/1/2017
- Returns
- Null if it fails, else a 2 g buffer.
◆ GetG2ABuff()
static CircularData SoundEngine::* SoundEngine::GetG2ABuff |
( |
| ) |
|
|
inlinestatic |
Gets g 2 a buffer.
- Author
- Jack Campbell
- Date
- 6/1/2017
- Returns
- Null if it fails, else the g 2 a buffer.
◆ Instance()
◆ LoadScript()
static snd_err SoundEngine::LoadScript |
( |
std::string |
path, |
|
|
SoundCallID |
id, |
|
|
void(*)(void) |
cb = nullptr |
|
) |
| |
|
inlinestatic |
Loads a script.
- Author
- Jack Campbell
- Date
- 6/1/2017
- Parameters
-
| path | Full pathname of the file. |
| id | The identifier. |
[in,out] | cb | (Optional) If non-null, the cb. |
- Returns
- The script.
◆ LoadSound()
static snd_err SoundEngine::LoadSound |
( |
std::string |
path, |
|
|
SoundCallID |
id, |
|
|
void(*)(void) |
cb = nullptr |
|
) |
| |
|
inlinestatic |
Loads a sound.
- Author
- Jack Campbell
- Date
- 6/1/2017
- Parameters
-
| path | Full pathname of the file. |
| id | The identifier. |
[in,out] | cb | (Optional) If non-null, the cb. |
- Returns
- The sound.
◆ operator=()
◆ privCreate()
snd_err SoundEngine::privCreate |
( |
| ) |
|
|
private |
◆ privCreateSoundCall() [1/2]
◆ privCreateSoundCall() [2/2]
◆ privFindSoundCall()
snd_err SoundEngine::privFindSoundCall |
( |
SoundCall *& |
out, |
|
|
unsigned int |
handle |
|
) |
| |
|
private |
◆ privGetA2GBuff()
◆ privGetG2ABuff()
◆ privLoadScript() [1/2]
snd_err SoundEngine::privLoadScript |
( |
std::string |
path, |
|
|
SoundCallID |
id, |
|
|
void(*)(void) |
cb = nullptr |
|
) |
| |
|
private |
◆ privLoadScript() [2/2]
snd_err SoundEngine::privLoadScript |
( |
const char * |
path, |
|
|
SoundCallID |
id, |
|
|
void(*)(void) |
cb |
|
) |
| |
|
private |
◆ privLoadSound()
◆ privReturnSoundCall()
◆ privSendData()
◆ privSendDataA2G()
◆ privTerminate()
snd_err SoundEngine::privTerminate |
( |
| ) |
|
|
private |
◆ privUpdate()
snd_err SoundEngine::privUpdate |
( |
| ) |
|
|
private |
◆ ReturnSoundCall()
Returns sound call.
- Author
- Jack Campbell
- Date
- 6/1/2017
- Parameters
-
[in,out] | in | If non-null, the in. |
- Returns
- The sound call.
◆ SendData()
Sends a command to the audio thread.
- Author
- Jack Campbell
- Date
- 6/1/2017
- Parameters
-
- Returns
- A snd_err.
◆ SendDataA2G()
Sends a command from audio thread to game.
- Author
- Jack Campbell
- Date
- 6/1/2017
- Parameters
-
- Returns
- A snd_err.
◆ Terminate()
static snd_err SoundEngine::Terminate |
( |
| ) |
|
|
inlinestatic |
Gets the terminate.
- Author
- Jack Campbell
- Date
- 6/1/2017
- Returns
- A snd_err.
◆ Update()
static snd_err SoundEngine::Update |
( |
| ) |
|
|
inlinestatic |
Updates this sound engine, processing commands.
- Author
- Jack Campbell
- Date
- 6/1/2017
- Returns
- A snd_err.
◆ activeSoundCalls
std::map<unsigned int, SoundCall*> SoundEngine::activeSoundCalls |
|
private |
◆ audioThread
std::thread SoundEngine::audioThread |
|
private |
◆ instance
◆ pA2GBuff
◆ pG2ABuff
The documentation for this class was generated from the following files: