|
From: Lasse Kärkkäi. <tr...@us...> - 2010-08-12 22:45:12
|
Module: performous
Branch: master
Commit: 1bf5c55883193d8f6d1e573e7ba28cb45846006e
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 18 18:38:25 2010 +0200
Disabled synth on stop and fade out
---
game/audio.cc | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/game/audio.cc b/game/audio.cc
index 458ee35..4c9ccd5 100644
--- a/game/audio.cc
+++ b/game/audio.cc
@@ -395,11 +395,23 @@ void Audio::playMusic(std::string const& filename, bool preview, double fadeTime
void Audio::stopMusic() {
std::map<std::string,std::string> m;
playMusic(m, false, 0.0);
+ {
+ Output& o = self->output;
+ // stop synth when music is stopped
+ boost::mutex::scoped_lock l(o.synth_mutex);
+ o.synth.reset();
+ }
}
void Audio::fadeout(double fadeTime) {
std::map<std::string,std::string> m;
playMusic(m, false, fadeTime);
+ {
+ Output& o = self->output;
+ // stop synth when music is stopped
+ boost::mutex::scoped_lock l(o.synth_mutex);
+ o.synth.reset();
+ }
}
double Audio::getPosition() const {
|