diff options
author | krzys-h <krzys_h@interia.pl> | 2013-12-28 12:30:46 +0100 |
---|---|---|
committer | krzys-h <krzys_h@interia.pl> | 2013-12-28 12:30:46 +0100 |
commit | e9addb5a5e072b28eecfa1739ae38d67b68a2b23 (patch) | |
tree | e46bb4510163ed0d6ad46285b1020e6edd0335e9 /src/object | |
parent | 0ff7e55b3343fbca959fb11236a009fb3790b652 (diff) | |
download | colobot-e9addb5a5e072b28eecfa1739ae38d67b68a2b23.tar.gz colobot-e9addb5a5e072b28eecfa1739ae38d67b68a2b23.tar.bz2 colobot-e9addb5a5e072b28eecfa1739ae38d67b68a2b23.zip |
Added smooth transition in music - issue #205
Diffstat (limited to 'src/object')
-rw-r--r-- | src/object/robotmain.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index 0fc17f3..1fa3058 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -1072,7 +1072,7 @@ void CRobotMain::ChangePhase(Phase phase) if (m_phase == PHASE_SIMUL) // ends a simulation? { SaveAllScript(); - m_sound->StopMusic(); + m_sound->StopMusic(0.0f); m_camera->SetControllingObject(0); /* TODO: #if _SCHOOL @@ -1226,7 +1226,7 @@ void CRobotMain::ChangePhase(Phase phase) m_infoFilename[SATCOM_HUSTON][0] != 0) StartDisplayInfo(SATCOM_HUSTON, false); // shows the instructions - m_sound->StopMusic(); + m_sound->StopMusic(0.0f); if (!m_base || loading) StartMusic(); } @@ -6954,7 +6954,6 @@ void CRobotMain::UpdateAudio(bool frame) nb <= m_audioChange[t].max) { CLogger::GetInstancePointer()->Info("Changing music to \"%s\"\n", m_audioChange[t].music); - m_sound->StopMusic(); m_sound->PlayMusic(std::string(m_audioChange[t].music), m_audioChange[t].repeat); m_audioChange[t].changed = true; } @@ -7510,8 +7509,7 @@ void CRobotMain::StartMusic() CLogger::GetInstancePointer()->Debug("Starting music...\n"); if (m_audioTrack != "") { - m_sound->StopMusic(); - m_sound->PlayMusic(m_audioTrack, m_audioRepeat); + m_sound->PlayMusic(m_audioTrack, m_audioRepeat, 0.0f); } } |