Skip to content

Commit

Permalink
fixing music not playing after death sometimes (#1833) (#1834)
Browse files Browse the repository at this point in the history
Resuming m_music_source on top of calling set_fading will play
the music if it has been paused, and will do nothing if the music
is not paused yet.
  • Loading branch information
LouriNoel committed Oct 11, 2021
1 parent d285880 commit 46cbd58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/audio/sound_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,10 @@ SoundManager::resume_music(float fadetime)

if (fadetime > 0) {
if (m_music_source
&& m_music_source->get_fade_state() != StreamSoundSource::FadingResume)
&& m_music_source->get_fade_state() != StreamSoundSource::FadingResume) {
m_music_source->set_fading(StreamSoundSource::FadingResume, fadetime);
m_music_source->resume();
}
} else {
m_music_source->resume();
}
Expand Down

0 comments on commit 46cbd58

Please sign in to comment.