diff options
| -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; } | 
