Skip to content

Commit

Permalink
TITANIC: Fix playback of ambient music for Top of the Well
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Aug 1, 2017
1 parent 848a601 commit f4f1566
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions engines/titanic/sound/auto_music_player_base.cpp
Expand Up @@ -70,7 +70,8 @@ bool CAutoMusicPlayerBase::TimerMsg(CTimerMsg *msg) {

bool CAutoMusicPlayerBase::LoadSuccessMsg(CLoadSuccessMsg *msg) {
if (_isRepeated)
playGlobalSound(_filename, _volumeMode, _initialMute, true, 0);
playGlobalSound(_filename, _volumeMode, _initialMute, true, 0,
Audio::Mixer::kMusicSoundType);

return true;
}
Expand All @@ -86,13 +87,15 @@ bool CAutoMusicPlayerBase::ChangeMusicMsg(CChangeMusicMsg *msg) {

if (_isRepeated) {
stopGlobalSound(_transition, -1);
playGlobalSound(_filename, _volumeMode, _initialMute, true, 0);
playGlobalSound(_filename, _volumeMode, _initialMute, true, 0,
Audio::Mixer::kMusicSoundType);
}
}

if (!_isRepeated && msg->_flags == 2) {
_isRepeated = true;
playGlobalSound(_filename, _volumeMode, _initialMute, true, 0);
playGlobalSound(_filename, _volumeMode, _initialMute, true, 0,
Audio::Mixer::kMusicSoundType);
}

return true;
Expand Down
4 changes: 2 additions & 2 deletions engines/titanic/sound/restricted_auto_music_player.cpp
Expand Up @@ -58,10 +58,10 @@ bool CRestrictedAutoMusicPlayer::EnterRoomMsg(CEnterRoomMsg *msg) {

CString roomName = msg->_oldRoom->getName();
if (_oldRoomName.compareToIgnoreCase(roomName)) {
return CAutoMusicPlayer::EnterRoomMsg(msg);
} else {
_isRepeated = true;
return false;
} else {
return CAutoMusicPlayer::EnterRoomMsg(msg);
}
}

Expand Down

0 comments on commit f4f1566

Please sign in to comment.