[Scummvm-cvs-logs] SF.net SVN: scummvm:[47421] tools/trunk

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Thu Jan 21 21:43:07 CET 2010


Revision: 47421
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47421&view=rev
Author:   mthreepwood
Date:     2010-01-21 20:42:45 +0000 (Thu, 21 Jan 2010)

Log Message:
-----------
Remove unused sound-based code from engines/mohawk/utils.

Modified Paths:
--------------
    tools/trunk/Makefile.common

Removed Paths:
-------------
    tools/trunk/engines/mohawk/utils/adpcm.cpp
    tools/trunk/engines/mohawk/utils/adpcm.h
    tools/trunk/engines/mohawk/utils/audiostream.cpp
    tools/trunk/engines/mohawk/utils/audiostream.h
    tools/trunk/engines/mohawk/utils/voc.cpp
    tools/trunk/engines/mohawk/utils/voc.h
    tools/trunk/engines/mohawk/utils/wave.cpp
    tools/trunk/engines/mohawk/utils/wave.h

Modified: tools/trunk/Makefile.common
===================================================================
--- tools/trunk/Makefile.common	2010-01-21 18:31:46 UTC (rev 47420)
+++ tools/trunk/Makefile.common	2010-01-21 20:42:45 UTC (rev 47421)
@@ -141,10 +141,6 @@
 	common/memorypool.o \
 	common/str.o \
 	engines/mohawk/utils/file.o \
-	engines/mohawk/utils/adpcm.o \
-	engines/mohawk/utils/audiostream.o \
-	engines/mohawk/utils/voc.o \
-	engines/mohawk/utils/wave.o \
 	common/md5.o \
 	common/util.o
 
@@ -177,10 +173,6 @@
 	common/memorypool.o \
 	common/str.o \
 	engines/mohawk/utils/file.o \
-	engines/mohawk/utils/adpcm.o \
-	engines/mohawk/utils/audiostream.o \
-	engines/mohawk/utils/voc.o \
-	engines/mohawk/utils/wave.o \
 	common/md5.o \
 	common/util.o
 

Deleted: tools/trunk/engines/mohawk/utils/adpcm.cpp
===================================================================
--- tools/trunk/engines/mohawk/utils/adpcm.cpp	2010-01-21 18:31:46 UTC (rev 47420)
+++ tools/trunk/engines/mohawk/utils/adpcm.cpp	2010-01-21 20:42:45 UTC (rev 47421)
@@ -1,354 +0,0 @@
-/* Scumm Tools
- * Copyright (C) 2004-2006  The ScummVM Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/tools/branches/gsoc2009-gui/utils/adpcm.cpp $
- * $Id: adpcm.cpp 40868 2009-05-24 15:19:28Z lordhoto $
- *
- */
-
-#include "adpcm.h"
-#include "util.h"
-
-namespace Audio {
-
-// TODO: Switch from a SeekableReadStream to a plain ReadStream. This requires
-// some internal refactoring but is definitely possible and will increase the
-// flexibility of this code.
-class ADPCMInputStream : public AudioStream {
-private:
-	Common::SeekableReadStream *_stream;
-	uint32 _endpos;
-	int _channels;
-	typesADPCM _type;
-	uint32 _blockAlign;
-	uint32 _blockPos;
-	int _blockLen;
-	int _rate;
-
-	struct ADPCMChannelStatus {
-		byte predictor;
-		int16 delta;
-		int16 coeff1;
-		int16 coeff2;
-		int16 sample1;
-		int16 sample2;
-	};
-
-	struct adpcmStatus {
-		// IMA
-		int32 last;
-		int32 stepIndex;
-
-		// MS ADPCM
-		ADPCMChannelStatus ch[2];
-	} _status;
-
-	int16 stepAdjust(byte);
-	int16 decodeOKI(byte);
-	int16 decodeMSIMA(byte);
-	int16 decodeMS(ADPCMChannelStatus *c, byte);
-
-public:
-	ADPCMInputStream(Common::SeekableReadStream *stream, uint32 size, typesADPCM type, int rate, int channels = 2, uint32 blockAlign = 0);
-	~ADPCMInputStream() {};
-
-	int readBuffer(int16 *buffer, const int numSamples);
-	int readBufferOKI(int16 *buffer, const int numSamples);
-	int readBufferMSIMA1(int16 *buffer, const int numSamples);
-	int readBufferMSIMA2(int16 *buffer, const int numSamples);
-	int readBufferMS(int channels, int16 *buffer, const int numSamples);
-
-	bool endOfData() const { return (_stream->eos() || _stream->pos() >= _endpos); }
-	bool isStereo() const	{ return false; }
-	int getRate() const	{ return _rate; }
-};
-
-// Routines to convert 12 bit linear samples to the
-// Dialogic or Oki ADPCM coding format aka VOX.
-// See also <http://www.comptek.ru/telephony/tnotes/tt1-13.html>
-//
-// In addition, also MS IMA ADPCM is supported. See
-//   <http://wiki.multimedia.cx/index.php?title=Microsoft_IMA_ADPCM>.
-
-ADPCMInputStream::ADPCMInputStream(Common::SeekableReadStream *stream, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign)
-	: _stream(stream), _channels(channels), _type(type), _blockAlign(blockAlign), _rate(rate) {
-
-	_status.last = 0;
-	_status.stepIndex = 0;
-	memset(_status.ch, 0, sizeof(_status.ch));
-	_endpos = stream->pos() + size;
-	_blockPos = _blockLen = 0;
-
-	if (type == kADPCMMSIma && blockAlign == 0)
-		error("ADPCMInputStream(): blockAlign isn't specifiled for MS IMA ADPCM");
-	if (type == kADPCMMS && blockAlign == 0)
-		error("ADPCMInputStream(): blockAlign isn't specifiled for MS ADPCM");
-}
-
-int ADPCMInputStream::readBuffer(int16 *buffer, const int numSamples) {
-	switch (_type) {
-	case kADPCMOki:
-		return readBufferOKI(buffer, numSamples);
-		break;
-	case kADPCMMSIma:
-		if (_channels == 1)
-			return readBufferMSIMA1(buffer, numSamples);
-		else
-			return readBufferMSIMA2(buffer, numSamples);
-		break;
-	case kADPCMMS:
-		return readBufferMS(_channels, buffer, numSamples);
-		break;
-	default:
-		error("Unsupported ADPCM encoding");
-		break;
-	}
-	return 0;
-}
-
-int ADPCMInputStream::readBufferOKI(int16 *buffer, const int numSamples) {
-	int samples;
-	byte data;
-
-	assert(numSamples % 2 == 0);
-
-	for (samples = 0; samples < numSamples && !_stream->eos() && _stream->pos() < _endpos; samples += 2) {
-		data = _stream->readByte();
-		WRITE_LE_UINT16(buffer + samples,     decodeOKI((data >> 4) & 0x0f));
-		WRITE_LE_UINT16(buffer + samples + 1, decodeOKI(data & 0x0f));
-	}
-	return samples;
-}
-
-
-int ADPCMInputStream::readBufferMSIMA1(int16 *buffer, const int numSamples) {
-	int samples;
-	byte data;
-
-	assert(numSamples % 2 == 0);
-
-	samples = 0;
-
-	while (samples < numSamples && !_stream->eos() && _stream->pos() < _endpos) {
-		if (_blockPos == _blockAlign) {
-			// read block header
-			_status.last = _stream->readSint16LE();
-			_status.stepIndex = _stream->readSint16LE();
-			_blockPos = 4;
-		}
-
-		for (; samples < numSamples && _blockPos < _blockAlign && !_stream->eos() && _stream->pos() < _endpos; samples += 2) {
-			data = _stream->readByte();
-			_blockPos++;
-			WRITE_LE_UINT16(buffer + samples,     decodeMSIMA(data & 0x0f));
-			WRITE_LE_UINT16(buffer + samples + 1, decodeMSIMA((data >> 4) & 0x0f));
-		}
-	}
-	return samples;
-}
-
-
-// Microsoft as usual tries to implement it differently. This method
-// is used for stereo data.
-int ADPCMInputStream::readBufferMSIMA2(int16 *buffer, const int numSamples) {
-	int samples;
-	uint32 data;
-	int nibble;
-
-	for (samples = 0; samples < numSamples && !_stream->eos() && _stream->pos() < _endpos;) {
-		for (int channel = 0; channel < 2; channel++) {
-			data = _stream->readUint32LE();
-
-			for (nibble = 0; nibble < 8; nibble++) {
-				byte k = ((data & 0xf0000000) >> 28);
-				WRITE_LE_UINT16(buffer + samples + channel + nibble * 2, decodeMSIMA(k));
-				data <<= 4;
-			}
-		}
-		samples += 16;
-	}
-	return samples;
-}
-
-static const int MSADPCMAdaptCoeff1[] = {
-	256, 512, 0, 192, 240, 460, 392
-};
-
-static const int MSADPCMAdaptCoeff2[] = {
-	0, -256, 0, 64, 0, -208, -232
-};
-
-int ADPCMInputStream::readBufferMS(int channels, int16 *buffer, const int numSamples) {
-	int samples;
-	byte data;
-	int stereo = channels - 1; // We use it in index
-
-	samples = 0;
-
-	while (samples < numSamples && !_stream->eos() && _stream->pos() < _endpos) {
-		if (_blockPos == _blockAlign) {
-			// read block header
-			_status.ch[0].predictor = Common::CLIP(_stream->readByte(), (byte)0, (byte)6);
-			_status.ch[0].coeff1 = MSADPCMAdaptCoeff1[_status.ch[0].predictor];
-			_status.ch[0].coeff2 = MSADPCMAdaptCoeff2[_status.ch[0].predictor];
-			if (stereo) {
-				_status.ch[1].predictor = Common::CLIP(_stream->readByte(), (byte)0, (byte)6);
-				_status.ch[1].coeff1 = MSADPCMAdaptCoeff1[_status.ch[1].predictor];
-				_status.ch[1].coeff2 = MSADPCMAdaptCoeff2[_status.ch[1].predictor];
-			}
-
-			_status.ch[0].delta = _stream->readSint16LE();
-			if (stereo)
-				_status.ch[1].delta = _stream->readSint16LE();
-
-			buffer[samples++] = _status.ch[0].sample1 = _stream->readSint16LE();
-			if (stereo)
-				buffer[samples++] = _status.ch[1].sample1 = _stream->readSint16LE();
-
-			buffer[samples++] = _status.ch[0].sample2 = _stream->readSint16LE();
-			if (stereo)
-				buffer[samples++] = _status.ch[1].sample2 = _stream->readSint16LE();
-
-			_blockPos = channels * 7;
-		}
-
-
-		for (; samples < numSamples && _blockPos < _blockAlign && !_stream->eos() && _stream->pos() < _endpos; samples += 2) {
-			data = _stream->readByte();
-			_blockPos++;
-			WRITE_LE_UINT16(buffer + samples,     decodeMS(&_status.ch[0], (data >> 4) & 0x0f));
-			WRITE_LE_UINT16(buffer + samples + 1, decodeMS(&_status.ch[stereo], data & 0x0f));
-		}
-	}
-
-	return samples;
-}
-
-
-// adjust the step for use on the next sample.
-int16 ADPCMInputStream::stepAdjust(byte code) {
-	static const int16 adjusts[] = {-1, -1, -1, -1, 2, 4, 6, 8};
-
-	return adjusts[code & 0x07];
-}
-
-static const int16 okiStepSize[49] = {
-	  16,   17,   19,   21,   23,   25,   28,   31,
-	  34,   37,   41,   45,   50,   55,   60,   66,
-	  73,   80,   88,   97,  107,  118,  130,  143,
-	 157,  173,  190,  209,  230,  253,  279,  307,
-	 337,  371,  408,  449,  494,  544,  598,  658,
-	 724,  796,  876,  963, 1060, 1166, 1282, 1411,
-	1552
-};
-
-// Decode Linear to ADPCM
-int16 ADPCMInputStream::decodeOKI(byte code) {
-	int16 diff, E, samp;
-
-	E = (2 * (code & 0x7) + 1) * okiStepSize[_status.stepIndex] / 8;
-	diff = (code & 0x08) ? -E : E;
-	samp = _status.last + diff;
-
-    // Clip the values to +/- 2^11 (supposed to be 12 bits)
-	if (samp > 2048)
-		samp = 2048;
-	if (samp < -2048)
-		samp = -2048;
-
-	_status.last = samp;
-	_status.stepIndex += stepAdjust(code);
-	if (_status.stepIndex < 0)
-		_status.stepIndex = 0;
-	if (_status.stepIndex > ARRAYSIZE(okiStepSize) - 1)
-		_status.stepIndex = ARRAYSIZE(okiStepSize) - 1;
-
-	// * 16 effectively converts 12-bit input to 16-bit output
-	return samp * 16;
-}
-
-
-static const uint16 imaStepTable[89] = {
-		7,	  8,	9,	 10,   11,	 12,   13,	 14,
-	   16,	 17,   19,	 21,   23,	 25,   28,	 31,
-	   34,	 37,   41,	 45,   50,	 55,   60,	 66,
-	   73,	 80,   88,	 97,  107,	118,  130,	143,
-	  157,	173,  190,	209,  230,	253,  279,	307,
-	  337,	371,  408,	449,  494,	544,  598,	658,
-	  724,	796,  876,	963, 1060, 1166, 1282, 1411,
-	 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024,
-	 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484,
-	 7132, 7845, 8630, 9493,10442,11487,12635,13899,
-	15289,16818,18500,20350,22385,24623,27086,29794,
-	32767
-};
-
-int16 ADPCMInputStream::decodeMSIMA(byte code) {
-	int32 diff, E, samp;
-
-	E = (2 * (code & 0x7) + 1) * imaStepTable[_status.stepIndex] / 8;
-	diff = (code & 0x08) ? -E : E;
-	samp = _status.last + diff;
-
-	if (samp < -0x8000)
-		samp = -0x8000;
-	else if (samp > 0x7fff)
-		samp = 0x7fff;
-
-	_status.last = samp;
-
-	_status.stepIndex += stepAdjust(code);
-	if (_status.stepIndex < 0)
-		_status.stepIndex = 0;
-	if (_status.stepIndex > ARRAYSIZE(imaStepTable) - 1)
-		_status.stepIndex = ARRAYSIZE(imaStepTable) - 1;
-
-	return samp;
-}
-
-static const int MSADPCMAdaptationTable[] = {
-	230, 230, 230, 230, 307, 409, 512, 614,
-	768, 614, 512, 409, 307, 230, 230, 230
-};
-
-
-int16 ADPCMInputStream::decodeMS(ADPCMChannelStatus *c, byte code) {
-	int32 predictor;
-
-	predictor = (((c->sample1) * (c->coeff1)) + ((c->sample2) * (c->coeff2))) / 256;
-	predictor += (signed)((code & 0x08) ? (code - 0x10) : (code)) * c->delta;
-
-	if (predictor < -0x8000)
-		predictor = -0x8000;
-	else if (predictor > 0x7fff)
-		predictor = 0x7fff;
-
-	c->sample2 = c->sample1;
-	c->sample1 = predictor;
-	c->delta = (MSADPCMAdaptationTable[(int)code] * c->delta) >> 8;
-
-	if (c->delta < 16)
-		c->delta = 16;
-
-	return (int16)predictor;
-}
-
-AudioStream *makeADPCMStream(Common::SeekableReadStream *stream, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign) {
-	return new ADPCMInputStream(stream, size, type, rate, channels, blockAlign);
-}
-
-} // End of namespace Audio

Deleted: tools/trunk/engines/mohawk/utils/adpcm.h
===================================================================
--- tools/trunk/engines/mohawk/utils/adpcm.h	2010-01-21 18:31:46 UTC (rev 47420)
+++ tools/trunk/engines/mohawk/utils/adpcm.h	2010-01-21 20:42:45 UTC (rev 47421)
@@ -1,43 +0,0 @@
-/* Scumm Tools
- * Copyright (C) 2004-2006  The ScummVM Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/tools/branches/gsoc2009-gui/utils/adpcm.h $
- * $Id: adpcm.h 23138 2006-06-15 15:44:06Z h00ligan $
- *
- */
-
-#ifndef SOUND_ADPCM_H
-#define SOUND_ADPCM_H
-
-#include "audiostream.h"
-#include "stream.h"
-
-namespace Audio {
-
-class AudioStream;
-
-enum typesADPCM {
-	kADPCMOki,
-	kADPCMMSIma,
-	kADPCMMS
-};
-
-AudioStream *makeADPCMStream(Common::SeekableReadStream *stream, uint32 size, typesADPCM type, int rate = 22050, int channels = 2, uint32 blockAlign = 0);
-
-} // End of namespace Audio
-
-#endif

Deleted: tools/trunk/engines/mohawk/utils/audiostream.cpp
===================================================================
--- tools/trunk/engines/mohawk/utils/audiostream.cpp	2010-01-21 18:31:46 UTC (rev 47420)
+++ tools/trunk/engines/mohawk/utils/audiostream.cpp	2010-01-21 20:42:45 UTC (rev 47421)
@@ -1,162 +0,0 @@
-/* Scumm Tools
- * Copyright (C) 2004-2006  The ScummVM Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/tools/branches/gsoc2009-gui/utils/audiostream.cpp $
- * $Id: audiostream.cpp 23138 2006-06-15 15:44:06Z h00ligan $
- *
- */
-
-#include "audiostream.h"
-
-
-namespace Audio {
-
-struct StreamFileFormat {
-	/** Decodername */
-	const char* decoderName;
-	const char* fileExtension;
-	/**
-	 * Pointer to a function which tries to open a file of type StreamFormat.
-	 * Return NULL in case of an error (invalid/nonexisting file).
-	 */
-	AudioStream* (*openStreamFile)(FILE *file, uint32 size);
-};
-
-
-#pragma mark -
-#pragma mark --- LinearMemoryStream ---
-#pragma mark -
-
-
-/**
- * A simple raw audio stream, purely memory based. It operates on a single
- * block of data, which is passed to it upon creation.
- * Optionally supports looping the sound.
- *
- * Design note: This code tries to be as optimized as possible (without
- * resorting to assembly, that is). To this end, it is written as a template
- * class. This way the compiler can actually create optimized code for each
- * special code. This results in a total of 12 versions of the code being
- * generated.
- */
-template<bool stereo, bool is16Bit, bool isUnsigned, bool isLE>
-class LinearMemoryStream : public AudioStream {
-protected:
-	const byte *_ptr;
-	const byte *_end;
-	const byte *_loopPtr;
-	const byte *_loopEnd;
-	const int _rate;
-	const byte *_origPtr;
-
-	inline bool eosIntern() const	{ return _ptr >= _end; };
-public:
-	LinearMemoryStream(int rate, const byte *ptr, uint32 len, uint32 loopOffset, uint32 loopLen, bool autoFreeMemory)
-		: _ptr(ptr), _end(ptr+len), _loopPtr(0), _loopEnd(0), _rate(rate) {
-
-		// Verify the buffer sizes are sane
-		if (is16Bit && stereo)
-			assert((len & 3) == 0 && (loopLen & 3) == 0);
-		else if (is16Bit || stereo)
-			assert((len & 1) == 0 && (loopLen & 1) == 0);
-
-		if (loopLen) {
-			_loopPtr = _ptr + loopOffset;
-			_loopEnd = _loopPtr + loopLen;
-		}
-		if (stereo)	// Stereo requires even sized data
-			assert(len % 2 == 0);
-
-		_origPtr = autoFreeMemory ? ptr : 0;
-	}
-	~LinearMemoryStream() {
-		free(const_cast<byte *>(_origPtr));
-	}
-	int readBuffer(int16 *buffer, const int numSamples);
-
-	bool isStereo() const		{ return stereo; }
-	bool endOfData() const		{ return eosIntern(); }
-
-	int getRate() const			{ return _rate; }
-};
-
-template<bool stereo, bool is16Bit, bool isUnsigned, bool isLE>
-int LinearMemoryStream<stereo, is16Bit, isUnsigned, isLE>::readBuffer(int16 *buffer, const int numSamples) {
-	int samples = 0;
-	while (samples < numSamples && !eosIntern()) {
-		const int len = Common::MIN(numSamples, samples + (int)(_end - _ptr) / (is16Bit ? 2 : 1));
-		while (samples < len) {
-			*buffer++ = READ_ENDIAN_SAMPLE(is16Bit, isUnsigned, _ptr, isLE);
-			_ptr += (is16Bit ? 2 : 1);
-			samples++;
-		}
-		// Loop, if looping was specified
-		if (_loopPtr && eosIntern()) {
-			_ptr = _loopPtr;
-			_end = _loopEnd;
-		}
-	}
-	return samples;
-}
-
-
-#pragma mark -
-#pragma mark --- Input stream factory ---
-#pragma mark -
-
-/* In the following, we use preprocessor / macro tricks to simplify the code
- * which instantiates the input streams. We used to use template functions for
- * this, but MSVC6 / EVC 3-4 (used for WinCE builds) are extremely buggy when it
- * comes to this feature of C++... so as a compromise we use macros to cut down
- * on the (source) code duplication a bit.
- * So while normally macro tricks are said to make maintenance harder, in this
- * particular case it should actually help it :-)
- */
-
-#define MAKE_LINEAR(STEREO, UNSIGNED) \
-		if (is16Bit) { \
-			if (isLE) \
-				return new LinearMemoryStream<STEREO, true, UNSIGNED, true>(rate, ptr, len, loopOffset, loopLen, autoFree); \
-			else  \
-				return new LinearMemoryStream<STEREO, true, UNSIGNED, false>(rate, ptr, len, loopOffset, loopLen, autoFree); \
-		} else \
-			return new LinearMemoryStream<STEREO, false, UNSIGNED, false>(rate, ptr, len, loopOffset, loopLen, autoFree)
-
-AudioStream *makeLinearInputStream(int rate, byte flags, const byte *ptr, uint32 len, uint32 loopOffset, uint32 loopLen) {
-	const bool isStereo   = (flags & Audio::Mixer::FLAG_STEREO) != 0;
-	const bool is16Bit    = (flags & Audio::Mixer::FLAG_16BITS) != 0;
-	const bool isUnsigned = (flags & Audio::Mixer::FLAG_UNSIGNED) != 0;
-	const bool isLE       = (flags & Audio::Mixer::FLAG_LITTLE_ENDIAN) != 0;
-	const bool autoFree   = (flags & Audio::Mixer::FLAG_AUTOFREE) != 0;
-
-	if (isStereo) {
-		if (isUnsigned) {
-			MAKE_LINEAR(true, true);
-		} else {
-			MAKE_LINEAR(true, false);
-		}
-	} else {
-		if (isUnsigned) {
-			MAKE_LINEAR(false, true);
-		} else {
-			MAKE_LINEAR(false, false);
-		}
-	}
-}
-
-
-} // End of namespace Audio

Deleted: tools/trunk/engines/mohawk/utils/audiostream.h
===================================================================
--- tools/trunk/engines/mohawk/utils/audiostream.h	2010-01-21 18:31:46 UTC (rev 47420)
+++ tools/trunk/engines/mohawk/utils/audiostream.h	2010-01-21 20:42:45 UTC (rev 47421)
@@ -1,153 +0,0 @@
-/* Scumm Tools
- * Copyright (C) 2004-2006  The ScummVM Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/tools/branches/gsoc2009-gui/utils/audiostream.h $
- * $Id: audiostream.h 23138 2006-06-15 15:44:06Z h00ligan $
- *
- */
-
-#ifndef SOUND_AUDIOSTREAM_H
-#define SOUND_AUDIOSTREAM_H
-
-#include "../util.h"
-#include "util.h"
-
-namespace Audio {
-
-class Mixer {
-public:
-	enum {
-		/** unsigned samples (default: signed) */
-		FLAG_UNSIGNED = 1 << 0,
-
-		/** sound is 16 bits wide (default: 8bit) */
-		FLAG_16BITS = 1 << 1,
-
-		/** sample is little endian (default: big endian) */
-		FLAG_LITTLE_ENDIAN = 1 << 2,
-
-		/** sound is in stereo (default: mono) */
-		FLAG_STEREO = 1 << 3,
-
-		/** reverse the left and right stereo channel */
-		FLAG_REVERSE_STEREO = 1 << 4,
-
-		/** sound buffer is freed automagically at the end of playing */
-		FLAG_AUTOFREE = 1 << 5,
-
-		/** loop the audio */
-		FLAG_LOOP = 1 << 6
-	};
-};
-
-/**
- * Generic input stream for the resampling code.
- */
-class AudioStream {
-public:
-	virtual ~AudioStream() {}
-
-	/**
-	 * Fill the given buffer with up to numSamples samples.
-	 * Returns the actual number of samples read, or -1 if
-	 * a critical error occured (note: you *must* check if
-	 * this value is less than what you requested, this can
-	 * happen when the stream is fully used up).
-	 *
-	 * Data has to be in native endianess, 16 bit per sample, signed.
-	 * For stereo stream, buffer will be filled with interleaved
-	 * left and right channel samples, starting with a left sample.
-	 * Furthermore, the samples in the left and right are summed up.
-	 * So if you request 4 samples from a stereo stream, you will get
-	 * a total of two left channel and two right channel samples.
-	 */
-	virtual int readBuffer(int16 *buffer, const int numSamples) = 0;
-
-	/** Is this a stereo stream? */
-	virtual bool isStereo() const = 0;
-
-	/**
-	 * End of data reached? If this returns true, it means that at this
-	 * time there is no data available in the stream. However there may be
-	 * more data in the future.
-	 * This is used by e.g. a rate converter to decide whether to keep on
-	 * converting data or stop.
-	 */
-	virtual bool endOfData() const = 0;
-
-	/**
-	 * End of stream reached? If this returns true, it means that all data
-	 * in this stream is used up and no additional data will appear in it
-	 * in the future.
-	 * This is used by the mixer to decide whether a given stream shall be
-	 * removed from the list of active streams (and thus be destroyed).
-	 * By default this maps to endOfData()
-	 */
-	virtual bool endOfStream() const { return endOfData(); }
-
-	/** Sample rate of the stream. */
-	virtual int getRate() const = 0;
-};
-
-/**
- * A simple AudioStream which represents a 'silent' stream,
- * containing the specified number of zero samples.
- */
-class ZeroInputStream : public AudioStream {
-private:
-	int _len;
-public:
-	ZeroInputStream(uint32 len) : _len(len) { }
-	int readBuffer(int16 *buffer, const int numSamples) {
-		int samples = Common::MIN(_len, numSamples);
-		memset(buffer, 0, samples * 2);
-		_len -= samples;
-		return samples;
-	}
-	bool isStereo() const { return false; }
-	bool eos() const { return _len <= 0; }
-
-	int getRate() const { return -1; }
-};
-
-AudioStream *makeLinearInputStream(int rate, byte flags, const byte *ptr, uint32 len, uint32 loopOffset, uint32 loopLen);
-
-/**
- * An audio stream to which additional data can be appended on-the-fly.
- * Used by SMUSH, iMuseDigital, and the Kyrandia 3 VQA player.
- */
-class AppendableAudioStream : public Audio::AudioStream {
-public:
-	virtual void append(const byte *data, uint32 len) = 0;
-	virtual void finish() = 0;
-};
-
-AppendableAudioStream *makeAppendableAudioStream(int rate, byte _flags, uint32 len);
-
-
-// This used to be an inline template function, but
-// buggy template function handling in MSVC6 forced
-// us to go with the macro approach. So far this is
-// the only template function that MSVC6 seemed to
-// compile incorrectly. Knock on wood.
-#define READ_ENDIAN_SAMPLE(is16Bit, isUnsigned, ptr, isLE) \
-	((is16Bit ? (isLE ? READ_LE_UINT16(ptr) : READ_BE_UINT16(ptr)) : (*ptr << 8)) ^ (isUnsigned ? 0x8000 : 0))
-
-
-} // End of namespace Audio
-
-#endif

Deleted: tools/trunk/engines/mohawk/utils/voc.cpp
===================================================================
--- tools/trunk/engines/mohawk/utils/voc.cpp	2010-01-21 18:31:46 UTC (rev 47420)
+++ tools/trunk/engines/mohawk/utils/voc.cpp	2010-01-21 20:42:45 UTC (rev 47421)
@@ -1,140 +0,0 @@
-/* Scumm Tools
- * Copyright (C) 2004-2006  The ScummVM Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/tools/branches/gsoc2009-gui/utils/voc.cpp $
- * $Id: voc.cpp 30977 2008-02-26 19:41:33Z fingolfin $
- *
- */
-
-#include "voc.h"
-#include "stream.h"
-#include "audiostream.h"
-
-
-namespace Audio {
-
-int getSampleRateFromVOCRate(int vocSR) {
-	if (vocSR == 0xa5 || vocSR == 0xa6) {
-		return 11025;
-	} else if (vocSR == 0xd2 || vocSR == 0xd3) {
-		return 22050;
-	} else {
-		int sr = 1000000L / (256L - vocSR);
-		// inexact sampling rates occur e.g. in the kitchen in Monkey Island,
-		// very easy to reach right from the start of the game.
-		//warning("inexact sample rate used: %i (0x%x)", sr, vocSR);
-		return sr;
-	}
-}
-
-byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate, int &loops, int &begin_loop, int &end_loop) {
-	VocFileHeader fileHeader;
-
-	if (stream.read(&fileHeader, 8) != 8)
-		goto invalid;
-
-	if (!memcmp(&fileHeader, "VTLK", 4)) {
-		if (stream.read(&fileHeader, sizeof(VocFileHeader)) != sizeof(VocFileHeader))
-			goto invalid;
-	} else if (!memcmp(&fileHeader, "Creative", 8)) {
-		if (stream.read(((byte *)&fileHeader) + 8, sizeof(VocFileHeader) - 8) != sizeof(VocFileHeader) - 8)
-			goto invalid;
-	} else {
-	invalid:;
-		warning("loadVOCFromStream: Invalid header");
-		return NULL;
-	}
-
-	if (memcmp(fileHeader.desc, "Creative Voice File", 19) != 0)
-		error("loadVOCFromStream: Invalid header");
-	if (fileHeader.desc[19] != 0x1A)
-		debug(3, "loadVOCFromStream: Partially invalid header");
-
-	int32 offset = READ_LE_UINT16(&fileHeader.datablock_offset);
-	int16 version = READ_LE_UINT16(&fileHeader.version);
-	int16 code = READ_LE_UINT16(&fileHeader.id);
-	assert(offset == sizeof(VocFileHeader));
-	// 0x100 is an invalid VOC version used by German version of DOTT (Disk) and
-	// French version of Simon the Sorcerer 2 (CD)
-	assert(version == 0x010A || version == 0x0114 || version == 0x0100);
-	assert(code == ~version + 0x1234);
-
-	int len;
-	byte *ret_sound = 0;
-	size = 0;
-	begin_loop = 0;
-	end_loop = 0;
-
-	while ((code = stream.readByte())) {
-		len = stream.readByte();
-		len |= stream.readByte() << 8;
-		len |= stream.readByte() << 16;
-
-		switch(code) {
-		case 1: {
-			int time_constant = stream.readByte();
-			int packing = stream.readByte();
-			len -= 2;
-			rate = getSampleRateFromVOCRate(time_constant);
-			debug(9, "VOC Data Block: %d, %d, %d", rate, packing, len);
-			if (packing == 0) {
-				if (size) {
-					ret_sound = (byte *)realloc(ret_sound, size + len);
-				} else {
-					ret_sound = (byte *)malloc(len);
-				}
-				stream.read(ret_sound + size, len);
-				size += len;
-				begin_loop = size;
-				end_loop = size;
-			} else {
-				warning("VOC file packing %d unsupported", packing);
-			}
-			} break;
-		case 6:	// begin of loop
-			assert(len == 2);
-			loops = stream.readUint16LE();
-			break;
-		case 7:	// end of loop
-			assert(len == 0);
-			break;
-		default:
-			warning("Invalid code in VOC file : %d", code);
-			return ret_sound;
-		}
-	}
-	debug(4, "VOC Data Size : %d", size);
-	return ret_sound;
-}
-
-byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate) {
-	int loops, begin_loop, end_loop;
-	return loadVOCFromStream(stream, size, rate, loops, begin_loop, end_loop);
-}
-
-AudioStream *makeVOCStream(Common::ReadStream &stream) {
-	int size, rate;
-	byte *data = loadVOCFromStream(stream, size, rate);
-
-	if (!data)
-		return 0;
-
-	return makeLinearInputStream(rate, Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED, data, size, 0, 0);
-}
-
-
-} // End of namespace Audio

Deleted: tools/trunk/engines/mohawk/utils/voc.h
===================================================================
--- tools/trunk/engines/mohawk/utils/voc.h	2010-01-21 18:31:46 UTC (rev 47420)
+++ tools/trunk/engines/mohawk/utils/voc.h	2010-01-21 20:42:45 UTC (rev 47421)
@@ -1,83 +0,0 @@
-/* Scumm Tools
- * Copyright (C) 2004-2006  The ScummVM Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/tools/branches/gsoc2009-gui/utils/voc.h $
- * $Id: voc.h 29430 2007-11-06 10:24:46Z fingolfin $
- *
- */
-
-#ifndef SOUND_VOC_H
-#define SOUND_VOC_H
-
-#include "../util.h"
-
-namespace Common { class ReadStream; }
-
-namespace Audio {
-
-class AudioStream;
-
-#include "common/pack-start.h"	/* START STRUCT PACKING */
-
-struct VocFileHeader {
-	uint8 desc[20];
-	uint16 datablock_offset;
-	uint16 version;
-	uint16 id;
-} GCC_PACK;
-
-struct VocBlockHeader {
-	uint8 blocktype;
-	uint8 size[3];
-	uint8 sr;
-	uint8 pack;
-} GCC_PACK;
-
-#include "common/pack-end.h"	/* END STRUCT PACKING */
-
-/**
- * Take a sample rate parameter as it occurs in a VOC sound header, and
- * return the corresponding sample frequency.
- *
- * This method has special cases for the standard rates of 11025 and 22050 kHz,
- * which due to limitations of the format, cannot be encoded exactly in a VOC
- * file. As a consequence, many game files have sound data sampled with those
- * rates, but the VOC marks them incorrectly as 11111 or 22222 kHz. This code
- * works around that and "unrounds" the sampling rates.
- */
-extern int getSampleRateFromVOCRate(int vocSR);
-
-/**
- * Try to load a VOC from the given seekable stream. Returns a pointer to memory
- * containing the PCM sample data (allocated with malloc). It is the callers
- * responsibility to dellocate that data again later on! Currently this
- * function only supports uncompressed raw PCM data.
- */
-extern byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate);
-
-/**
- * Try to load a VOC from the given seekable stream and create an AudioStream
- * from that data. Currently this function only supports uncompressed raw PCM
- * data. Looping is not supported.
- *
- * This function uses loadVOCFromStream() internally.
- */
-AudioStream *makeVOCStream(Common::ReadStream &stream);
-
-} // End of namespace Audio
-
-#endif

Deleted: tools/trunk/engines/mohawk/utils/wave.cpp
===================================================================
--- tools/trunk/engines/mohawk/utils/wave.cpp	2010-01-21 18:31:46 UTC (rev 47420)
+++ tools/trunk/engines/mohawk/utils/wave.cpp	2010-01-21 20:42:45 UTC (rev 47421)
@@ -1,204 +0,0 @@
-/* Scumm Tools
- * Copyright (C) 2004-2006  The ScummVM Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/tools/branches/gsoc2009-gui/utils/wave.cpp $
- * $Id: wave.cpp 41558 2009-06-15 21:12:51Z fingolfin $
- *
- */
-
-/* Scumm Tools
- * Copyright (C) 2004-2006  The ScummVM Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/tools/branches/gsoc2009-gui/utils/wave.cpp $
- * $Id: wave.cpp 41558 2009-06-15 21:12:51Z fingolfin $
- *
- */
-
-#include "stream.h"
-#include "audiostream.h"
-#include "adpcm.h"
-
-namespace Audio {
-
-bool loadWAVFromStream(Common::SeekableReadStream &stream, int &size, int &rate, byte &flags, uint16 *wavType, int *blockAlign_) {
-	const uint32 initialPos = stream.pos();
-	byte buf[4+1];
-
-	buf[4] = 0;
-
-	stream.read(buf, 4);
-	if (memcmp(buf, "RIFF", 4) != 0) {
-		warning("getWavInfo: No 'RIFF' header");
-		return false;
-	}
-
-	uint32 wavLength = stream.readUint32LE();
-
-	stream.read(buf, 4);
-	if (memcmp(buf, "WAVE", 4) != 0) {
-		warning("getWavInfo: No 'WAVE' header");
-		return false;
-	}
-
-	stream.read(buf, 4);
-	if (memcmp(buf, "fmt ", 4) != 0) {
-		warning("getWavInfo: No 'fmt' header");
-		return false;
-	}
-
-	uint32 fmtLength = stream.readUint32LE();
-	if (fmtLength < 16) {
-		// A valid fmt chunk always contains at least 16 bytes
-		warning("getWavInfo: 'fmt' header is too short");
-		return false;
-	}
-
-	// Next comes the "type" field of the fmt header. Some typical
-	// values for it:
-	// 1  -> uncompressed PCM
-	// 17 -> IMA ADPCM compressed WAVE
-	// See <http://www.saettler.com/RIFFNEW/RIFFNEW.htm> for a more complete
-	// list of common WAVE compression formats...
-	uint16 type = stream.readUint16LE();	// == 1 for PCM data
-	uint16 numChannels = stream.readUint16LE();	// 1 for mono, 2 for stereo
-	uint32 samplesPerSec = stream.readUint32LE();	// in Hz
-	uint32 avgBytesPerSec = stream.readUint32LE();	// == SampleRate * NumChannels * BitsPerSample/8
-
-	uint16 blockAlign = stream.readUint16LE();	// == NumChannels * BitsPerSample/8
-	uint16 bitsPerSample = stream.readUint16LE();	// 8, 16 ...
-	// 8 bit data is unsigned, 16 bit data signed
-
-
-	if (wavType != 0)
-		*wavType = type;
-
-	if (blockAlign_ != 0)
-		*blockAlign_ = blockAlign;
-#if 0
-	printf("WAVE information:\n");
-	printf("  total size: %d\n", wavLength);
-	printf("  fmt size: %d\n", fmtLength);
-	printf("  type: %d\n", type);
-	printf("  numChannels: %d\n", numChannels);
-	printf("  samplesPerSec: %d\n", samplesPerSec);
-	printf("  avgBytesPerSec: %d\n", avgBytesPerSec);
-	printf("  blockAlign: %d\n", blockAlign);
-	printf("  bitsPerSample: %d\n", bitsPerSample);
-#endif
-
-	if (type != 1 && type != 2 && type != 17) {
-		warning("getWavInfo: only PCM, MS ADPCM or IMA ADPCM data is supported (type %d)", type);
-		return false;
-	}
-
-	if (blockAlign != numChannels * bitsPerSample / 8 && type != 2) {
-		debug(0, "getWavInfo: blockAlign is invalid");
-	}
-
-	if (avgBytesPerSec != samplesPerSec * blockAlign && type != 2) {
-		debug(0, "getWavInfo: avgBytesPerSec is invalid");
-	}
-
-	// Prepare the return values.
-	rate = samplesPerSec;
-
-	flags = 0;
-	if (bitsPerSample == 8)		// 8 bit data is unsigned
-		flags |= Audio::Mixer::FLAG_UNSIGNED;
-	else if (bitsPerSample == 16)	// 16 bit data is signed little endian
-		flags |= (Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_LITTLE_ENDIAN);
-	else if (bitsPerSample == 4 && type == 17)	// MS IMA ADPCM compressed. We decompress it
-		flags |= (Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_LITTLE_ENDIAN);
-	else if (bitsPerSample == 4 && type == 2)	// MS ADPCM compressed. We decompress it
-		flags |= (Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_LITTLE_ENDIAN);
-	else {
-		warning("getWavInfo: unsupported bitsPerSample %d", bitsPerSample);
-		return false;
-	}
-
-	if (numChannels == 2)
-		flags |= Audio::Mixer::FLAG_STEREO;
-	else if (numChannels != 1) {
-		warning("getWavInfo: unsupported number of channels %d", numChannels);
-		return false;
-	}
-
-	// It's almost certainly a WAV file, but we still need to find its
-	// 'data' chunk.
-
-	// Skip over the rest of the fmt chunk.
-	int offset = fmtLength - 16;
-
-	do {
-		stream.seek(offset, SEEK_CUR);
-		if (stream.pos() >= initialPos + wavLength + 8) {
-			warning("getWavInfo: Cannot find 'data' chunk");
-			return false;
-		}
-		stream.read(buf, 4);
-		offset = stream.readUint32LE();
-
-#if 0
-		printf("  found a '%s' tag of size %d\n", buf, offset);
-#endif
-	} while (memcmp(buf, "data", 4) != 0);
-
-	// Stream now points at 'offset' bytes of sample data...
-	size = offset;
-
-	return true;
-}
-
-AudioStream *makeWAVStream(Common::SeekableReadStream &stream) {
-	int size, rate;
-	byte flags;
-	uint16 type;
-	int blockAlign;
-
-	if (!loadWAVFromStream(stream, size, rate, flags, &type, &blockAlign))
-		return 0;
-
-	if (type == 17) // MS IMA ADPCM
-		return makeADPCMStream(&stream, size, kADPCMMSIma, rate, (flags & Audio::Mixer::FLAG_STEREO) ? 2 : 1);
-	if (type == 2) // MS ADPCM
-		return makeADPCMStream(&stream, size, kADPCMMS, rate, (flags & Audio::Mixer::FLAG_STEREO) ? 2 : 1, blockAlign);
-
-	byte *data = (byte *)malloc(size);
-	assert(data);
-	stream.read(data, size);
-
-	// Since we allocated our own buffer for the data, we must set the autofree flag.
-	flags |= Audio::Mixer::FLAG_AUTOFREE;
-
-	return makeLinearInputStream(rate, flags, data, size, 0, 0);
-}
-
-} // End of namespace Audio

Deleted: tools/trunk/engines/mohawk/utils/wave.h
===================================================================
--- tools/trunk/engines/mohawk/utils/wave.h	2010-01-21 18:31:46 UTC (rev 47420)
+++ tools/trunk/engines/mohawk/utils/wave.h	2010-01-21 20:42:45 UTC (rev 47421)
@@ -1,53 +0,0 @@
-/* Scumm Tools
- * Copyright (C) 2004-2006  The ScummVM Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/tools/branches/gsoc2009-gui/utils/wave.h $
- * $Id: wave.h 23138 2006-06-15 15:44:06Z h00ligan $
- *
- */
-
-#ifndef SOUND_WAVE_H
-#define SOUND_WAVE_H
-
-
-namespace Common { class SeekableReadStream; }
-
-namespace Audio {
-
-class AudioStream;
-
-/**
- * Try to load a WAVE from the given seekable stream. Returns true if
- * successful. In that case, the stream's seek position will be set to the
- * start of the audio data, and size, rate and flags contain information
- * necessary for playback. Currently this function only supports uncompressed
- * raw PCM data as well as IMA ADPCM.
- */
-extern bool loadWAVFromStream(Common::SeekableReadStream &stream, int &size, int &rate, byte &flags, uint16 *wavType = 0, int *blockAlign = 0);
-
-/**
- * Try to load a WAVE from the given seekable stream and create an AudioStream
- * from that data. Currently this function only supports uncompressed raw PCM
- * data as well as IMA ADPCM.
- *
- * This function uses loadWAVFromStream() internally.
- */
-AudioStream *makeWAVStream(Common::SeekableReadStream &stream);
-
-} // End of namespace Audio
-
-#endif


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list