projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc17c54
)
fix music not playing again after disable&enabling it
author
Matthias Braun
<matze@braunis.de>
Wed, 11 Jan 2006 23:38:48 +0000
(23:38 +0000)
committer
Matthias Braun
<matze@braunis.de>
Wed, 11 Jan 2006 23:38:48 +0000
(23:38 +0000)
SVN-Revision: 2986
src/audio/sound_manager.cpp
patch
|
blob
|
history
diff --git
a/src/audio/sound_manager.cpp
b/src/audio/sound_manager.cpp
index
963ce94
..
1490768
100644
(file)
--- a/
src/audio/sound_manager.cpp
+++ b/
src/audio/sound_manager.cpp
@@
-167,12
+167,18
@@
SoundManager::stop_music(bool fade)
void
SoundManager::play_music(const std::string& filename, bool fade)
{
- if(filename == current_music)
+ if(filename == current_music
&& music_source != NULL
)
return;
current_music = filename;
if(!music_enabled)
return;
+ if(filename == "") {
+ delete music_source;
+ music_source = 0;
+ return;
+ }
+
try {
std::auto_ptr<StreamSoundSource> newmusic (new StreamSoundSource());
alSourcef(newmusic->source, AL_ROLLOFF_FACTOR, 0);