|
From: Lasse Kärkkäi. <tr...@us...> - 2010-03-14 10:06:08
|
Module: performous
Branch: master
Commit: 81ed6d3f8d63ca1cd78cc6c80c098e6a44d892a1
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Mar 14 12:05:20 2010 +0200
Fix failvolume (need testing).
---
game/audio.cc | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/game/audio.cc b/game/audio.cc
index 69cb406..ae4acfb 100644
--- a/game/audio.cc
+++ b/game/audio.cc
@@ -68,8 +68,10 @@ void Audio::play(Sample const& s, std::string const& volumeSetting) {
if (vol > 0) vol = std::pow(10.0, (vol - 100.0) / 100.0 * 2.0);
m_volume.level(vol);
boost::shared_ptr<da::accumulate> acc(new da::accumulate());
- acc->add(da::shared_ref(new SampleStream(s.mpeg)));
- acc->add(da::shared_ref(new da::volume(vol)));
+ boost::shared_ptr<da::chain> ch(new da::chain());
+ ch->add(da::shared_ref(new SampleStream(s.mpeg)));
+ ch->add(da::shared_ref(new da::volume(vol)));
+ acc->add(da::shared_ref(ch));
m_mixer.add(da::shared_ref(acc));
}
|