summaryrefslogtreecommitdiff
path: root/src/sound.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-18 22:47:30 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-18 23:24:03 +0100
commit20afba1adc84dd0e859605250c5a44a111045c2b (patch)
tree304f34e96403215a8e1d9a3cf880a6a28f5a4721 /src/sound.h
parent6fd1246735010bccd0d75e9e7969431b963b7858 (diff)
downloadmana-client-20afba1adc84dd0e859605250c5a44a111045c2b.tar.gz
mana-client-20afba1adc84dd0e859605250c5a44a111045c2b.tar.bz2
mana-client-20afba1adc84dd0e859605250c5a44a111045c2b.tar.xz
mana-client-20afba1adc84dd0e859605250c5a44a111045c2b.zip
Added notification sound on receiving whisper
One of the sound channels is reserved for notification sounds, of which the volume can be configured separately. Currently, the only notification sound that is played is for receiving whispers. That can be extended later. The newmessage.ogg sound used currently is the one for receiving a message with the Psi instant messenger. Parts of this patch are based on the new message notification in ManaPlus. Reviewed-by: Erik Schilling
Diffstat (limited to 'src/sound.h')
-rw-r--r--src/sound.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sound.h b/src/sound.h
index dd368f84..180bca62 100644
--- a/src/sound.h
+++ b/src/sound.h
@@ -92,6 +92,7 @@ class Sound
void setMusicVolume(int volume);
void setSfxVolume(int volume);
+ void setNotificationsVolume(int volume);
/**
* Plays a sound at the specified location.
@@ -103,6 +104,13 @@ class Sound
void playSfx(const std::string &path, int x = 0, int y = 0);
/**
+ * Plays a sound on the notification channel.
+ *
+ * @param path The resource path to the sound file.
+ */
+ void playNotification(const std::string &path);
+
+ /**
* The sound logic.
* Currently used to check whether the music file can be freed after
* a fade out, and whether new music has to be played.
@@ -125,6 +133,7 @@ class Sound
bool mInstalled;
int mSfxVolume;
+ int mNotificationsVolume;
int mMusicVolume;
std::string mCurrentMusicFile;