diff options
author | Filippos Karapetis | 2015-02-24 00:47:21 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-15 00:05:02 +0100 |
commit | 1c77b2daf88c465c8f8cffddff65f8a7bca1af89 (patch) | |
tree | 18d3851466ac88933ee3b23bb9c88f29ff6d8f4c | |
parent | ca819e0b863cf56e1f03dde302f075472ec11e79 (diff) | |
download | scummvm-rg350-1c77b2daf88c465c8f8cffddff65f8a7bca1af89.tar.gz scummvm-rg350-1c77b2daf88c465c8f8cffddff65f8a7bca1af89.tar.bz2 scummvm-rg350-1c77b2daf88c465c8f8cffddff65f8a7bca1af89.zip |
LAB: Implement correct duration calculation for the DOS version music
-rw-r--r-- | engines/lab/labmusic.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/engines/lab/labmusic.cpp b/engines/lab/labmusic.cpp index cd082700ca..4a427eded0 100644 --- a/engines/lab/labmusic.cpp +++ b/engines/lab/labmusic.cpp @@ -33,6 +33,7 @@ #include "lab/timing.h" #include "lab/mouse.h" #include "lab/vga.h" +#include "lab/lab.h" namespace Lab { @@ -470,8 +471,10 @@ byte **Music::newOpen(const char *name) { if (_musicOn) { updateMusic(); - LeftSecs = (getManyBuffersLeft() * MUSICBUFSIZE * 10) / (2 * SAMPLESPEED); // Windows (16-bit) - //LeftSecs = (getManyBuffersLeft() * MUSICBUFSIZE * 10) / SAMPLESPEED; // DOS (8-bit) - TODO + if (g_lab->getPlatform() == Common::kPlatformWindows) + LeftSecs = (getManyBuffersLeft() * MUSICBUFSIZE * 10) / (2 * SAMPLESPEED); // Windows (16-bit) + else + LeftSecs = (getManyBuffersLeft() * MUSICBUFSIZE * 10) / SAMPLESPEED; // DOS (8-bit) filelength = sizeOfFile(name) * 10; Time = 10 + /* Seek time for the music and the file */ @@ -507,8 +510,10 @@ void Music::fileCheckMusic(uint32 filelength) { updateMusic(); - LeftSecs = (getManyBuffersLeft() * MUSICBUFSIZE * 10) / (2 * SAMPLESPEED); // Windows (16-bit) - //LeftSecs = (getManyBuffersLeft() * MUSICBUFSIZE * 10) / SAMPLESPEED; // DOS (8-bit) - TODO + if (g_lab->getPlatform() == Common::kPlatformWindows) + LeftSecs = (getManyBuffersLeft() * MUSICBUFSIZE * 10) / (2 * SAMPLESPEED); // Windows (16-bit) + else + LeftSecs = (getManyBuffersLeft() * MUSICBUFSIZE * 10) / SAMPLESPEED; // DOS (8-bit) filelength *= 10; Time = 5 + /* Seek time for the music */ |