diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-03 21:58:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-04 03:06:57 +0300 |
commit | 866a71ffd576fd10c4e309195016d86f0c8ed635 (patch) | |
tree | 21bbec175afc181cada529598267d62f12fcb671 /src/sound.h | |
parent | ebecb0cf42f2066943908fa158ac91527e0e6629 (diff) | |
download | manaplus-866a71ffd576fd10c4e309195016d86f0c8ed635.tar.gz manaplus-866a71ffd576fd10c4e309195016d86f0c8ed635.tar.bz2 manaplus-866a71ffd576fd10c4e309195016d86f0c8ed635.tar.xz manaplus-866a71ffd576fd10c4e309195016d86f0c8ed635.zip |
Add const to more classes.
Diffstat (limited to 'src/sound.h')
-rw-r--r-- | src/sound.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/sound.h b/src/sound.h index bf9226c18..7db9ecfea 100644 --- a/src/sound.h +++ b/src/sound.h @@ -80,14 +80,14 @@ class Sound : public ConfigListener * @param fileName The name of the music file. * @param ms Duration of fade-in effect (ms) */ - void fadeInMusic(const std::string &fileName, int ms = 1000); + void fadeInMusic(const std::string &fileName, const int ms = 1000); /** * Fades out currently running background music track. * * @param ms Duration of fade-out effect (ms) */ - void fadeOutMusic(int ms = 1000); + void fadeOutMusic(const int ms = 1000); /** * Fades out a background music and play a new one. @@ -95,21 +95,23 @@ class Sound : public ConfigListener * @param fileName The name of the music file. * @param ms Duration of fade-out effect (ms) */ - void fadeOutAndPlayMusic(const std::string &fileName, int ms = 1000); + void fadeOutAndPlayMusic(const std::string &fileName, + const int ms = 1000); int getMaxVolume() const { return MIX_MAX_VOLUME; } - void setMusicVolume(int volume); + void setMusicVolume(const int volume); - void setSfxVolume(int volume); + void setSfxVolume(const int volume); /** * Plays an item. * * @param path The resource path to the sound file. */ - void playSfx(const std::string &path, int x = 0, int y = 0); + void playSfx(const std::string &path, const int x = 0, + const int y = 0) const; /** * Plays an item for gui. @@ -122,7 +124,7 @@ class Sound : public ConfigListener void changeAudio(); - void volumeOff(); + void volumeOff() const; void volumeRestore(); @@ -138,7 +140,7 @@ class Sound : public ConfigListener private: /** Logs various info about sound device. */ - void info(); + void info() const; /** Halts and frees currently playing music. */ void haltMusic(); |