diff options
| author | Torbjörn Andersson | 2003-09-25 10:02:52 +0000 |
|---|---|---|
| committer | Torbjörn Andersson | 2003-09-25 10:02:52 +0000 |
| commit | b9cc1725b7b11fef693b3b3d0bf653a431b3b625 (patch) | |
| tree | 33bb37643135832b2252580fcd2c2770275f8d57 | |
| parent | 2122f117936988cf6c9db8ecb20432ba43c8d3ed (diff) | |
| download | scummvm-rg350-b9cc1725b7b11fef693b3b3d0bf653a431b3b625.tar.gz scummvm-rg350-b9cc1725b7b11fef693b3b3d0bf653a431b3b625.tar.bz2 scummvm-rg350-b9cc1725b7b11fef693b3b3d0bf653a431b3b625.zip | |
Some minor fixes. Unfortunately I've noticed that there is some major sound
distortion in the credits music, and I haven't yet figured out what's
causing this.
svn-id: r10406
| -rw-r--r-- | sword2/driver/d_sound.cpp | 10 | ||||
| -rw-r--r-- | sword2/driver/d_sound.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp index 4a3b465efc..51bf4188e7 100644 --- a/sword2/driver/d_sound.cpp +++ b/sword2/driver/d_sound.cpp @@ -165,9 +165,9 @@ static File fpMus; // Decompression macros -#define GetCompressedShift(byte) ((byte) >> 4) -#define GetCompressedSign(byte) (((byte) >> 3) & 1) -#define GetCompressedAmplitude(byte) ((byte) & 7) +#define GetCompressedShift(n) ((n) >> 4) +#define GetCompressedSign(n) (((n) >> 3) & 1) +#define GetCompressedAmplitude(n) ((n) & 7) int32 panTable[33] = { -127, -119, -111, -103, -95, -87, -79, -71, -63, -55, -47, -39, -31, -23, -15, -7, @@ -943,8 +943,8 @@ int32 Sword2Sound::StreamCompMusicFromLock(const char *filename, uint32 musicId, // Calculate the file position of the end of the music music[primaryStream]._fileEnd += music[primaryStream]._filePos; - music[primaryStream]._lastSample = fpMus.readByte(); - music[primaryStream]._filePos++; + music[primaryStream]._lastSample = fpMus.readUint16LE(); + music[primaryStream]._filePos += 2; music[primaryStream]._streaming = true; return RD_OK; diff --git a/sword2/driver/d_sound.h b/sword2/driver/d_sound.h index c2d41dc7eb..f1d8f7e53d 100644 --- a/sword2/driver/d_sound.h +++ b/sword2/driver/d_sound.h @@ -62,7 +62,7 @@ public: int32 _fading; int32 _filePos; int32 _fileEnd; - int16 _lastSample; + uint16 _lastSample; bool isStereo() const { return false; } int getRate() const { return 22050; } |
