From dc5e08e623453aef8bbd92c484dde26d67d91d1e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 19 Jan 2010 22:30:33 +0000 Subject: Move raw audio flags from sound/mixer.h to sound/raw.h svn-id: r47395 --- sound/shorten.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'sound/shorten.cpp') diff --git a/sound/shorten.cpp b/sound/shorten.cpp index 44f4e66ed8..48d82dadf7 100644 --- a/sound/shorten.cpp +++ b/sound/shorten.cpp @@ -196,18 +196,18 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by case kTypeS8: break; case kTypeU8: - flags |= Audio::Mixer::FLAG_UNSIGNED; + flags |= Audio::FLAG_UNSIGNED; break; case kTypeS16LH: - flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN; + flags |= Audio::FLAG_LITTLE_ENDIAN; case kTypeS16HL: - flags |= Audio::Mixer::FLAG_16BITS; + flags |= Audio::FLAG_16BITS; break; case kTypeU16LH: - flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN; + flags |= Audio::FLAG_LITTLE_ENDIAN; case kTypeU16HL: - flags |= Audio::Mixer::FLAG_16BITS; - flags |= Audio::Mixer::FLAG_UNSIGNED; + flags |= Audio::FLAG_16BITS; + flags |= Audio::FLAG_UNSIGNED; break; case kTypeWAV: // TODO: Perhaps implement this if we find WAV Shorten encoded files @@ -426,16 +426,16 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by } if (curChannel == channels - 1) { - int dataSize = (flags & Audio::Mixer::FLAG_16BITS) ? 2 : 1; - int limit = (flags & Audio::Mixer::FLAG_16BITS) ? 32767 : 127; - limit = (flags & Audio::Mixer::FLAG_UNSIGNED) ? limit * 2 + 1 : limit; + int dataSize = (flags & Audio::FLAG_16BITS) ? 2 : 1; + int limit = (flags & Audio::FLAG_16BITS) ? 32767 : 127; + limit = (flags & Audio::FLAG_UNSIGNED) ? limit * 2 + 1 : limit; prevSize = size; size += (blockSize * dataSize); unpackedBuffer = (byte *) realloc(unpackedBuffer, size); pBuf = unpackedBuffer + prevSize; - if (flags & Audio::Mixer::FLAG_16BITS) { + if (flags & Audio::FLAG_16BITS) { for (i = 0; i < blockSize; i++) { for (j = 0; j < channels; j++) { int16 val = (int16)(MIN(buffer[j][i], limit) & 0xFFFF); -- cgit v1.2.3