summaryrefslogtreecommitdiff
path: root/src/sound.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sound.h')
-rw-r--r--src/sound.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/sound.h b/src/sound.h
index 6ac361cac..869f136da 100644
--- a/src/sound.h
+++ b/src/sound.h
@@ -29,6 +29,8 @@
#include <string>
+class Music;
+
/** Sound engine
*
* \ingroup CORE
@@ -54,9 +56,9 @@ class Sound : public ConfigListener
/**
* Starts background music.
*
- * @param path The full path to the music file.
+ * @param fileName The name of the music file.
*/
- void playMusic(const std::string &path);
+ void playMusic(const std::string &fileName);
/**
* Stops currently running background music track.
@@ -66,10 +68,10 @@ class Sound : public ConfigListener
/**
* Fades in background music.
*
- * @param path The full path to the music file.
- * @param ms Duration of fade-in effect (ms)
+ * @param fileName The name of the music file.
+ * @param ms Duration of fade-in effect (ms)
*/
- void fadeInMusic(const std::string &path, int ms = 1000);
+ void fadeInMusic(const std::string &fileName, int ms = 1000);
/**
* Fades out currently running background music track.
@@ -81,15 +83,16 @@ class Sound : public ConfigListener
/**
* Fades out a background music and play a new one.
*
- * @param path The full path to the fade in music file.
- * @param ms Duration of fade-out effect (ms)
+ * @param fileName The name of the music file.
+ * @param ms Duration of fade-out effect (ms)
*/
- void fadeOutAndPlayMusic(const std::string &path, int ms = 1000);
+ void fadeOutAndPlayMusic(const std::string &fileName, int ms = 1000);
int getMaxVolume() const
{ return MIX_MAX_VOLUME; }
void setMusicVolume(int volume);
+
void setSfxVolume(int volume);
/**
@@ -133,7 +136,7 @@ class Sound : public ConfigListener
* When calling fadeOutAndPlayMusic(),
* the music file below will then be played
*/
- std::string mNextMusicPath;
+ std::string mNextMusicFile;
bool mInstalled;
@@ -141,7 +144,7 @@ class Sound : public ConfigListener
int mMusicVolume;
std::string mCurrentMusicFile;
- Mix_Music *mMusic;
+ Music *mMusic;
bool mPlayBattle;
bool mPlayGui;
bool mPlayMusic;