20#ifndef HEADER_MUSICMANAGER_HPP
21#define HEADER_MUSICMANAGER_HPP
23#include "audio/music.hpp"
24#include "audio/music_information.hpp"
25#include "utils/no_copy.hpp"
42 std::atomic<MusicInformation*> m_current_music;
50 std::map<std::string, MusicInformation*>
54 void loadMusicInformation();
55 void loadMusicFromOneDir(
const std::string& dir);
61 void addMusicToTracks();
65 bool start_right_now=
true);
87 m_current_music = NULL;
Central place to request for musics to be loaded, played, stopped, etc...
Definition: music_manager.hpp:39
void pauseMusic()
Insert a command into the sfx queue to pause the current music.
Definition: music_manager.cpp:212
std::map< std::string, MusicInformation * > m_all_music
Stores all music information files (read from the .music files).
Definition: music_manager.hpp:51
bool initialized() const
Returns if the music system is initialised.
Definition: music_manager.hpp:78
MusicInformation * getMusicInformation(const std::string &filename)
Definition: music_manager.cpp:284
void resumeMusic()
Inserts a resume current music event into the queue.
Definition: music_manager.cpp:221
void setMasterMusicVolume(float gain)
Sets the master music volume.
Definition: music_manager.cpp:263
void switchToFastMusic()
Switches to fast (last lap ) music (if defined for the current music).
Definition: music_manager.cpp:230
bool m_initialized
If the sound could not be initialized, e.g.
Definition: music_manager.hpp:47
float getMasterMusicVolume() const
Returns the master volume.
Definition: music_manager.hpp:75
void startMusic()
Special shortcut vor overworld (which skips other phases where the music would normally be started.
Definition: music_manager.cpp:165
void setTemporaryVolume(float gain)
Queues a command to temporarily change the volume.
Definition: music_manager.cpp:242
MusicInformation * getCurrentMusic()
Returns the information object of the current music.
Definition: music_manager.hpp:81
void resetTemporaryVolume()
Queues a command for the sfx manager to reset a temporary volume change.
Definition: music_manager.cpp:252
void clearCurrentMusic()
Stops and removes the current music.
Definition: music_manager.hpp:84
void stopMusic()
Queues a stop current music event for the audio thread.
Definition: music_manager.cpp:203
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:26
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35