|
From: Yoda-JM <yo...@us...> - 2009-07-13 10:56:21
|
Module: performous
Branch: master
Commit: dffd813685e3f6a6ea1d5cd1839616ca07453a56
Author: Vincent Le Ligeour <yo...@us...>
Date: Mon Jul 13 12:55:48 2009 +0200
Tried to fix seekeing
---
game/audio.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/audio.cc b/game/audio.cc
index 7db4e06..4abafaa 100644
--- a/game/audio.cc
+++ b/game/audio.cc
@@ -67,6 +67,7 @@ void Audio::operator()(da::pcm_data& areas, da::settings const&) {
void Audio::playMusic(std::vector<std::string> const& filenames, bool preview, double fadeTime, double startPos) {
if (!isOpen()) return;
// First construct the new stream
+ boost::recursive_mutex::scoped_lock l(m_mutex);
fadeout(fadeTime);
for(std::vector<std::string>::const_iterator it = filenames.begin() ; it != filenames.end() ; ++it ) {
std::auto_ptr<Stream> s;
@@ -78,7 +79,6 @@ void Audio::playMusic(std::vector<std::string> const& filenames, bool preview, d
std::cerr << "Error loading " << *it << " (" << e.what() << ")" << std::endl;
continue;
}
- boost::recursive_mutex::scoped_lock l(m_mutex);
m_streams.push_back(s);
}
if (!preview) m_paused = false;
|