@@ -59,14 +59,16 @@ void MusicMan::Update() {
59
59
m_PreviousSoundContainer->FadeOut (musicFadeOutTimeMs);
60
60
}
61
61
}
62
+ } else if (!m_ReturnToDynamicMusic) {
63
+ if (m_CurrentSoundContainer && m_CurrentSoundContainer->GetAudibleVolume () == 0 .0F ) {
64
+ g_ConsoleMan.PrintString (" MusicMan: Inaudible CurrentSoundContainer is about to be deleted: " + m_PreviousSoundContainer->GetPresetName ());
65
+ m_CurrentSoundContainer = nullptr ;
66
+ }
62
67
}
63
68
if (m_PreviousSoundContainer && m_PreviousSoundContainer->GetAudibleVolume () == 0 .0F ) {
64
69
g_ConsoleMan.PrintString (" MusicMan: Inaudible PreviousSoundContainer is about to be deleted: " + m_PreviousSoundContainer->GetPresetName ());
65
70
m_PreviousSoundContainer = nullptr ;
66
71
}
67
- if (m_CurrentSoundContainer && m_CurrentSoundContainer->GetAudibleVolume () == 0 .0F ) {
68
- m_CurrentSoundContainer = nullptr ;
69
- }
70
72
}
71
73
72
74
bool MusicMan::IsMusicPlaying () const {
@@ -171,8 +173,8 @@ bool MusicMan::CyclePlayingSoundContainers(bool smoothFade) {
171
173
if (m_CurrentSoundContainer && m_CurrentSoundContainer->IsBeingPlayed ()) {
172
174
if (smoothFade) {
173
175
m_CurrentSoundContainer->FadeOut (static_cast <int >(m_NextSoundContainer->GetMusicPreEntryTime ()));
174
- } else {
175
- g_ConsoleMan.PrintString (" No smoothFade means upcoming PreviousSoundContainer will be faded out at entry point." );
176
+ } else if (!m_MusicTimer. IsPastRealTimeLimit ()) {
177
+ g_ConsoleMan.PrintString (" No smoothFade and premature cycling means upcoming PreviousSoundContainer will be faded out at entry point." );
176
178
m_PreviousSoundContainerSetToFade = true ;
177
179
m_MusicFadeTimer.Reset ();
178
180
m_MusicFadeTimer.SetRealTimeLimitMS (static_cast <int >(m_NextSoundContainer->GetMusicPreEntryTime ()));
@@ -251,6 +253,7 @@ void MusicMan::PlayInterruptingMusic(const SoundContainer* soundContainer) {
251
253
}
252
254
253
255
void MusicMan::EndInterruptingMusic () {
256
+ g_ConsoleMan.PrintString (" MusicMan: Ending interrupting music." );
254
257
if (m_InterruptingMusicSoundContainer && m_InterruptingMusicSoundContainer->IsBeingPlayed ()) {
255
258
m_InterruptingMusicSoundContainer->Stop ();
256
259
@@ -259,6 +262,7 @@ void MusicMan::EndInterruptingMusic() {
259
262
}
260
263
261
264
if (m_CurrentSoundContainer != nullptr ) {
265
+ g_ConsoleMan.PrintString (" Unpausing CurrentSoundContainer." );
262
266
m_CurrentSoundContainer->SetPaused (false );
263
267
}
264
268
0 commit comments