projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56b51eb
)
Prevent previous music from playing when sound file couldn't be found
author
Tobias Markus
<tobbi@mozilla-uk.org>
Sun, 25 Aug 2013 10:19:51 +0000
(12:19 +0200)
committer
Tobias Markus
<tobbi@mozilla-uk.org>
Sun, 25 Aug 2013 10:19:51 +0000
(12:19 +0200)
src/audio/sound_manager.cpp
patch
|
blob
|
history
diff --git
a/src/audio/sound_manager.cpp
b/src/audio/sound_manager.cpp
index
a7f32d8
..
89f86b2
100644
(file)
--- a/
src/audio/sound_manager.cpp
+++ b/
src/audio/sound_manager.cpp
@@
-305,6
+305,8
@@
SoundManager::play_music(const std::string& filename, bool fade)
music_source = newmusic.release();
} catch(std::exception& e) {
log_warning << "Couldn't play music file '" << filename << "': " << e.what() << std::endl;
+ // When this happens, previous music continued playing, stop it, just in case.
+ stop_music(0);
}
}