[Scummvm-cvs-logs] CVS: scummvm/scumm/imuse_digi dimuse.cpp,1.32,1.33
Pawel Kolodziejski
aquadran at users.sourceforge.net
Thu Jan 15 00:02:04 CET 2004
Update of /cvsroot/scummvm/scummvm/scumm/imuse_digi
In directory sc8-pr-cvs1:/tmp/cvs-serv19452
Modified Files:
dimuse.cpp
Log Message:
fix overload algo position music
Index: dimuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_digi/dimuse.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- dimuse.cpp 15 Jan 2004 07:02:29 -0000 1.32
+++ dimuse.cpp 15 Jan 2004 08:01:28 -0000 1.33
@@ -623,8 +623,8 @@
int32 IMuseDigital::getPosInMs(int soundId) {
for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) {
_track[l].locked = true;
- if ((_track[l].soundId == soundId) && _track[l].used) {
- int32 pos = 1000 * (_track[l].dataOffset + _track[l].regionOffset) / _track[l].iteration;
+ if ((_track[l].soundId == soundId) && (_track[l].used)) {
+ int32 pos = (5 * (_track[l].dataOffset + _track[l].regionOffset)) / (_track[l].iteration / 200);
_track[l].locked = false;
return pos;
}
@@ -645,8 +645,9 @@
_track[l].locked = false;
}
- debug(5, "IMuseDigital::getCurMusicPosInMs(%d)", soundId);
- return getPosInMs(soundId);
+ int32 msPos = getPosInMs(soundId);
+ debug(5, "IMuseDigital::getCurMusicPosInMs(%d) = %d", soundId, msPos);
+ return msPos;
}
int32 IMuseDigital::getCurVoiceLipSyncWidth() {
@@ -681,7 +682,7 @@
int32 msPos = getPosInMs(soundId) + _vm->VAR(_vm->VAR_SYNC) + 50;
int32 width = 0, height = 0;
- debug(5, "IMuseDigital::getCurVoiceLipSyncWidth(%d)", soundId);
+ debug(5, "IMuseDigital::getCurVoiceLipSyncWidth(%d, %d)", soundId, msPos);
getLipSync(soundId, syncId, msPos, width, height);
return width;
}
@@ -700,7 +701,7 @@
int32 msPos = getPosInMs(soundId) + _vm->VAR(_vm->VAR_SYNC) + 50;
int32 width = 0, height = 0;
- debug(5, "IMuseDigital::getCurVoiceLipSyncHeight(%d)", soundId);
+ debug(5, "IMuseDigital::getCurVoiceLipSyncHeight(%d, %d)", soundId, msPos);
getLipSync(soundId, syncId, msPos, width, height);
return height;
}
More information about the Scummvm-git-logs
mailing list