diff options
author | Norbert Lange | 2009-06-16 14:12:53 +0000 |
---|---|---|
committer | Norbert Lange | 2009-06-16 14:12:53 +0000 |
commit | 6126341755d37d2238fe0ce5467f629cb32229e7 (patch) | |
tree | c197fd641a499af637fa979e86bb830efecff8eb /engines | |
parent | c8d05aca48ca4af8f042d0442f20320201c81f92 (diff) | |
download | scummvm-rg350-6126341755d37d2238fe0ce5467f629cb32229e7.tar.gz scummvm-rg350-6126341755d37d2238fe0ce5467f629cb32229e7.tar.bz2 scummvm-rg350-6126341755d37d2238fe0ce5467f629cb32229e7.zip |
changed musictiming again, using a 25/70 seconds as counter.
svn-id: r41585
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/player_v4a.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/scumm/player_v4a.cpp b/engines/scumm/player_v4a.cpp index 581a3ed94e..1483b67b42 100644 --- a/engines/scumm/player_v4a.cpp +++ b/engines/scumm/player_v4a.cpp @@ -93,11 +93,7 @@ void Player_V4A::startSound(int nr) { byte *ptr = _vm->getResourceAddress(rtSound, nr); assert(ptr); - char buf[22]; - sprintf(buf,"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", ptr[0], ptr[1], ptr[2], ptr[3], - ptr[4], ptr[5], ptr[6], ptr[7], ptr[8], ptr[9] ); - debug("%s", buf); - + Common::hexdump(ptr, 16); static const int8 monkeyCommands[52] = { -1, -2, -3, -4, -5, -6, -7, -8, @@ -125,16 +121,20 @@ void Player_V4A::startSound(int nr) { _tfmxPlay->doSong(index); _musicId = nr; - _musicLastTicks = _tfmxPlay->getTicks(); - + _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, _tfmxPlay, -1, Audio::Mixer::kMaxChannelVolume, 0, false, false); + _musicLastTicks = g_system->getMillis(); } } int Player_V4A::getMusicTimer() const { if (_musicId) { - return (_tfmxPlay->getTicks() - _musicLastTicks) / 25; + // TODO: The titlesong is running with ~70 ticks per second and the scale seems to be based on that. + // Other songs dont and I have no clue if this scalevalue is anything close to correct for them. + // The Amiga-Game doesnt counts the ticks of the song, but has an own timer and I hope thespeed is constant through the game + const int magicScale = 359; // ~ 1000 * 25 * (10173 / 709379.0) + return (_mixer->getSoundElapsedTime(_musicHandle)) / magicScale; } else return 0; } |