diff options
author | Kevin Smith <git@kismith.co.uk> | 2009-09-12 18:55:01 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2009-09-12 18:55:01 (GMT) |
commit | 7dafb815ca404f1e15c9cdf6b26817c941dae4ec (patch) | |
tree | 5f1a523042bd4b9ccb84efce74ab2441dacef8ea /Swift/Controllers/SoundEventController.cpp | |
parent | 7e157ace6678dd4af7a091ea5cc5fbc3baabe7f7 (diff) | |
download | swift-contrib-7dafb815ca404f1e15c9cdf6b26817c941dae4ec.zip swift-contrib-7dafb815ca404f1e15c9cdf6b26817c941dae4ec.tar.bz2 |
Getting ready for sounds to be turned off.
Diffstat (limited to 'Swift/Controllers/SoundEventController.cpp')
-rw-r--r-- | Swift/Controllers/SoundEventController.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Swift/Controllers/SoundEventController.cpp b/Swift/Controllers/SoundEventController.cpp index 46d6ddb..133becf 100644 --- a/Swift/Controllers/SoundEventController.cpp +++ b/Swift/Controllers/SoundEventController.cpp @@ -7,15 +7,19 @@ namespace Swift { -SoundEventController::SoundEventController(EventController* eventController, SoundPlayer* soundPlayer) { +SoundEventController::SoundEventController(EventController* eventController, SoundPlayer* soundPlayer, bool playSounds) { eventController_ = eventController; soundPlayer_ = soundPlayer; + playSounds_ = playSounds; eventController_->onEventQueueEventAdded.connect(boost::bind(&SoundEventController::handleEventQueueEventAdded, this, _1)); } void SoundEventController::handleEventQueueEventAdded(boost::shared_ptr<MessageEvent> event) { - soundPlayer_->playSound(SoundPlayer::MessageReceived); + if (playSounds_) soundPlayer_->playSound(SoundPlayer::MessageReceived); } +void SoundEventController::setPlaySounds(bool playSounds) { + playSounds_ = playSounds; +} } |