58 void playMusic(
const std::string &fileName);
71 void fadeInMusic(
const std::string &fileName,
int ms = 1000);
89 {
return MIX_MAX_VOLUME; }
102 void playSfx(
const std::string &path,
int x = 0,
int y = 0);
Defines a class for loading and storing music.
Automatically counting Resource reference.
Defines a class for loading and storing sound effects.
void fadeOutAndPlayMusic(const std::string &fileName, int ms=1000)
Fades out a background music and play a new one.
void playMusic(const std::string &fileName)
Starts background music.
void fadeOutMusic(int ms=1000)
Fades out currently running background music track.
void init()
Installs the sound engine.
void fadeInMusic(const std::string &fileName, int ms=1000)
Fades in background music.
void setMusicVolume(int volume)
void info()
Logs various info about sound device.
void haltMusic()
Halts and frees currently playing music.
void logic()
The sound logic.
void stopMusic()
Stops currently running background music track.
void close()
Removes all sound functionalities.
void setSfxVolume(int volume)
std::string mCurrentMusicFile
void setNotificationsVolume(int volume)
void playSfx(const std::string &path, int x=0, int y=0)
Plays a sound at the specified location.
ResourceRef< Music > mMusic
void playNotification(const std::string &path)
Plays a sound on the notification channel.
ResourceRef< SoundEffect > mSounds[CHANNEL_COUNT]
std::string mNextMusicFile
When calling fadeOutAndPlayMusic(), the music file below will then be played.