From 15fa71e1bf8c3826bdd8f0e6d4abe72c7fc1abca Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Thu, 26 Aug 2004 06:59:15 +0000 Subject: Explicitly cast value to uint32, since there was a report about compilation problems. Perhaps this will fix it? svn-id: r14762 --- sword2/driver/d_sound.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sword2') diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp index a0278817aa..cdba64c023 100644 --- a/sword2/driver/d_sound.cpp +++ b/sword2/driver/d_sound.cpp @@ -52,11 +52,11 @@ static File fpMus; #define GetCompressedSign(n) (((n) >> 3) & 1) #define GetCompressedAmplitude(n) ((n) & 7) -#define BUFFER_SIZE 4096U +#define BUFFER_SIZE 4096 class CLUInputStream : public AudioStream { File *_file; - uint _end_pos; + uint32 _end_pos; int16 _outbuf[BUFFER_SIZE]; byte _inbuf[BUFFER_SIZE]; const int16 *_bufferEnd; @@ -128,7 +128,7 @@ int CLUInputStream::readBuffer(int16 *buffer, const int numSamples) { void CLUInputStream::refill() { byte *in = _inbuf; int16 *out = _outbuf; - uint len_left = _file->read(in, MIN(BUFFER_SIZE, _end_pos - _file->pos())); + uint len_left = _file->read(in, MIN((uint32) BUFFER_SIZE, _end_pos - _file->pos())); while (len_left > 0) { uint16 delta = GetCompressedAmplitude(*in) << GetCompressedShift(*in); -- cgit v1.2.3