diff --git a/desktop_version/src/Music.cpp b/desktop_version/src/Music.cpp index d2450800..01da28f5 100644 --- a/desktop_version/src/Music.cpp +++ b/desktop_version/src/Music.cpp @@ -10,6 +10,27 @@ void songend(); +musicclass::musicclass() +{ + safeToProcessMusic= false; + m_doFadeInVol = false; + musicVolume = MIX_MAX_VOLUME; + FadeVolAmountPerFrame = 0; + + currentsong = 0; + nicechange = -1; + nicefade = false; + resumesong = 0; + quick_fade = true; + + songStart = 0; + songEnd = 0; + + Mix_HookMusicFinished(&songend); + + usingmmmmmm = false; +} + void musicclass::init() { for (size_t i = 0; i < soundTracks.size(); ++i) { @@ -129,24 +150,6 @@ void musicclass::init() num_pppppp_tracks++; } - - safeToProcessMusic= false; - m_doFadeInVol = false; - musicVolume = MIX_MAX_VOLUME; - FadeVolAmountPerFrame = 0; - - currentsong = 0; - nicechange = -1; - nicefade = false; - resumesong = 0; - quick_fade = true; - - songStart = 0; - songEnd = 0; - - Mix_HookMusicFinished(&songend); - - usingmmmmmm = false; } void songend() diff --git a/desktop_version/src/Music.h b/desktop_version/src/Music.h index 6717015c..ae5ed9da 100644 --- a/desktop_version/src/Music.h +++ b/desktop_version/src/Music.h @@ -11,6 +11,7 @@ class musicclass { public: + musicclass(); void init(); void play(int t, const double position_sec = 0.0, const int fadein_ms = 3000);