From 866a71ffd576fd10c4e309195016d86f0c8ed635 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 3 Sep 2012 21:58:08 +0300 Subject: Add const to more classes. --- src/sound.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/sound.h') 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(); -- cgit v1.2.3-60-g2f50