#include <Sound.h>
Public Member Functions | |
| Sound () | |
| ~Sound () | |
| void | initLevel (std::string levelName, Level2D *level) |
| void | update (Level2D *level) |
| void | endLevel () |
Public Attributes | |
| ALObj * | portalSound |
| ALObj * | portalSoundFinal |
| ALObj * | speechLevel |
| bool | debug |
Manages everything sound related in the game. It holds an OpenAL Application (ALApp) and different sound objects (ALObj). It implements the logic to play the music and sound effects patterns depending on the individual level data.
filename: Sound.h
| sonus::Sound::Sound | ( | ) |
| sonus::Sound::~Sound | ( | ) |
Destructor Unloads the OpenAL application.
| void sonus::Sound::initLevel | ( | std::string | levelName, | |
| Level2D * | level | |||
| ) |
Initializes the world by a given Level2D pointer. Looks for the configuration file of the level and analyzes it for the amount and types of sound source files and their paths alongside definitions of sound transitions.
| levelName | The name of the level to load. Used to identify the unique configurations file. | |
| level | The Level2D object containing all the essential world objects needed for initialization. |
| void sonus::Sound::update | ( | Level2D * | level | ) |
Updates the world by a given Level2D pointer. The game application object triggers the update routines of all modules (including the sound) in a certain cycle.
In this routine the whole logic processing of sound is done:
| level | The Level2D object containing all the essential world objects needed for initialization. |
| void sonus::Sound::endLevel | ( | ) |
Stops all playing sources and mutes them.
1.5.4