aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorPaweł Kołodziejski2003-11-12 07:05:52 +0000
committerPaweł Kołodziejski2003-11-12 07:05:52 +0000
commit97c78cc37693a5780ad2243d736c835d7f1a23ef (patch)
tree624a0e53a763570ab5a27fb5b2f2b23f5f7dc616 /scumm
parent18c28863a2f67ca272920796c76fbb0d27c79782 (diff)
downloadscummvm-rg350-97c78cc37693a5780ad2243d736c835d7f1a23ef.tar.gz
scummvm-rg350-97c78cc37693a5780ad2243d736c835d7f1a23ef.tar.bz2
scummvm-rg350-97c78cc37693a5780ad2243d736c835d7f1a23ef.zip
changed getting position of bundle song to ms
svn-id: r11265
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v8.cpp2
-rw-r--r--scumm/sound.cpp4
-rw-r--r--scumm/sound.h1
3 files changed, 6 insertions, 1 deletions
diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp
index b6339f3d09..a0a5242d03 100644
--- a/scumm/script_v8.cpp
+++ b/scumm/script_v8.cpp
@@ -1497,7 +1497,7 @@ void ScummEngine_v8::o8_kernelGetFunctions() {
case 0xE1: // imGetMusicPosition
warning("o8_kernelGetFunctions: imGetMusicPosition(stub)");
// FIXME - get this stuff to be properly implemented
- push(_sound->_bundleMusicPosition);
+ push(_sound->_bundleSongPosInMs);
break;
case 0xE2: // musicLipSyncWidth
case 0xE3: // musicLipSyncHeight
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 91e3e60466..32c2fb26be 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -1039,6 +1039,7 @@ void Sound::playBundleMusic(const char *song) {
_offsetSampleBundleMusic = 0;
_offsetBufBundleMusic = 0;
_bundleMusicPosition = 0;
+ _bundleSongPosInMs = 0;
_pauseBundleMusic = false;
_musicBundleToBeChanged = false;
_bundleMusicTrack = 0;
@@ -1087,6 +1088,7 @@ void Sound::bundleMusicHandler(ScummEngine *scumm) {
_offsetBufBundleMusic = 0;
_musicBundleToBeChanged = false;
_bundleMusicPosition = 0;
+ _bundleSongPosInMs = 0;
}
ptr = _musicBundleBufOutput;
@@ -1153,6 +1155,7 @@ void Sound::bundleMusicHandler(ScummEngine *scumm) {
_offsetSampleBundleMusic = 0;
_offsetBufBundleMusic = 0;
_bundleMusicPosition = 0;
+ _bundleSongPosInMs = 0;
}
ptr = _musicBundleBufFinal;
@@ -1170,6 +1173,7 @@ void Sound::bundleMusicHandler(ScummEngine *scumm) {
return;
}
+ _bundleSongPosInMs = (_bundleMusicPosition * 5) / (_outputMixerSize / 200);
_bundleMusicPosition += final_size;
if (_bundleMusicTrack == 0) {
_scumm->_mixer->newStream(&_bundleMusicTrack, buffer, final_size, rate,
diff --git a/scumm/sound.h b/scumm/sound.h
index eb9ff522a7..28e9d135a6 100644
--- a/scumm/sound.h
+++ b/scumm/sound.h
@@ -42,6 +42,7 @@ protected:
public:
const char *_nameBundleMusic;
int32 _bundleMusicPosition;
+ int32 _bundleSongPosInMs;
protected:
const char *_newNameBundleMusic;