[Scummvm-git-logs] scummvm master -> 61dd4fb9cf6fb7bbdb160750ea16e612506193f6

a-yyg 76591232+a-yyg at users.noreply.github.com
Fri Jul 2 15:29:37 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
61dd4fb9cf SAGA2: Remove decoders classes


Commit: 61dd4fb9cf6fb7bbdb160750ea16e612506193f6
    https://github.com/scummvm/scummvm/commit/61dd4fb9cf6fb7bbdb160750ea16e612506193f6
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-07-03T00:28:49+09:00

Commit Message:
SAGA2: Remove decoders classes

Changed paths:
  R engines/saga2/audiocmp.h
  R engines/saga2/audiodec.h
  R engines/saga2/audiofnc.h
    engines/saga2/audio.cpp
    engines/saga2/audiobuf.h
    engines/saga2/audiores.cpp
    engines/saga2/audiosmp.h
    engines/saga2/audiosys.h
    engines/saga2/noise.cpp


diff --git a/engines/saga2/audio.cpp b/engines/saga2/audio.cpp
index 4f0d69270b..6874d77849 100644
--- a/engines/saga2/audio.cpp
+++ b/engines/saga2/audio.cpp
@@ -36,9 +36,6 @@
 #include "saga2/audiosmp.h"
 #include "saga2/audiosys.h"
 
-#include "saga2/audiodec.h"
-#include "saga2/audiofnc.h"
-
 namespace Saga2 {
 
 audioInterface *audio;
@@ -222,43 +219,4 @@ audioAttenuationFunction audioInterface::setAttenuator(audioAttenuationFunction
 	return nullptr;
 }
 
-soundDecoder::soundDecoder() {
-	warning("STUB: soundDecoder::soundDecoder()");
-}
-
-soundDecoder::~soundDecoder() {
-	warning("STUB: soundDecoder::~soundDecoder()");
-}
-
-soundDecoder::soundDecoder(INPLACEDECODER *, INPLACEDECODER *, INPLACEDECODER *) {
-	warning("STUB: soundDecoder::soundDecoder(INPLACEDECODER *, INPLACEDECODER *, INPLACEDECODER *)");
-}
-
-soundDecoder::soundDecoder(BUFFERDECODER *, BUFFERDECODER *, BUFFERDECODER *, int16, audioInterface *, int16) {
-	warning("STUB: soundDecoder::soundDecoder(BUFFERDECODER *, BUFFERDECODER *, BUFFERDECODER *, int16, audioInterface *, int16)");
-}
-
-soundDecoder::soundDecoder(BUFFERLOADER *, BUFFERLOADER *, BUFFERLOADER *) {
-	warning("STUB: soundDecoder::soundDecoder(BUFFERLOADER *, BUFFERLOADER *, BUFFERLOADER *)");
-}
-
-void decoderSet::addDecoder(soundDecoder *sodec) {
-	warning("STUB: soundDecoder::addDecoder()");
-}
-
-BUFFERDEC(flushDecompress) {
-	warning("STUB: flushDecompress()");
-	return 0;
-}
-
-BUFFERDEC(seekDecompress) {
-	warning("STUB: seekDecompress()");
-	return 0;
-}
-
-BUFFERDEC(readDecompress) {
-	warning("STUB: readDecompress()");
-	return 0;
-}
-
 } // end of namespace Saga2
diff --git a/engines/saga2/audiobuf.h b/engines/saga2/audiobuf.h
index 188ee9c5a0..4718411782 100644
--- a/engines/saga2/audiobuf.h
+++ b/engines/saga2/audiobuf.h
@@ -36,9 +36,6 @@ class singleBuffer;
 class musicBuffer;
 class cacheBuffer;
 
-class soundDecoder;
-class decoderSet;
-
 class soundSample;
 
 class soundQueue;
diff --git a/engines/saga2/audiocmp.h b/engines/saga2/audiocmp.h
deleted file mode 100644
index d4d7c63664..0000000000
--- a/engines/saga2/audiocmp.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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.
- *
- *
- * Based on the original sources
- *   Faery Tale II -- The Halls of the Dead
- *   (c) 1993-1996 The Wyrmkeep Entertainment Co.
- */
-
-#ifndef SAGA2_AUDIOCMP_H
-#define SAGA2_AUDIOCMP_H
-
-namespace Saga2 {
-
-/* ===================================================================== *
-    Tweak values
- * ===================================================================== */
-
-#define MAXIMAL_COMPRESSION 8
-#define EXPECTED_COMPRESSION 4
-
-/* ===================================================================== *
-    Decompression engine
- * ===================================================================== */
-
-class soundDecompression {
-public:
-
-	workBuffer  *filei;      // input 'file' ( buffer )
-	workBuffer *workBuf;     // input 'file' ( buffer ) copy
-	Buffer  *fileo;          // output 'file' ( buffer )
-	Buffer *targBuf;         // output 'file' ( buffer ) copy
-
-	soundDecoder *readFrom;    // input decoder
-	soundSample *sampleAttrib; // audio attributes
-
-	uint32 rVal;               // decoder return value
-
-	long **buffer, * *offset;
-	long default_offset, lpcqoffset;
-	int version, bitshift ;
-	int hiloint, hilo ;
-	int ftype ;
-	int blocksize, nchan;
-	int i, chan, nwrap, nskip, ndiscard ;
-	int *qlpc, maxnlpc, nmean ;
-	int quanterror, nfilename;
-	int minsnr;
-	int decompState;
-	char *magic, *old_magic, *filenamei, *filenameo ;
-	char *tmpfilename ;
-	char *maxresnstr;
-
-	bool decerr, deceof;       // error, eof detect on input buffer
-	bool deserr, deseof;       // error, eof detect on output buffer
-
-	soundDecompression(void);
-	soundDecompression(Buffer *sb, soundDecoder *sd, soundSample *ss, workBuffer *wb);
-	void *operator new (size_t s) {
-		return audioAlloc(s, "audio decmp data");
-	}
-	void operator delete (void *m) {
-		audioFree(m);
-	}
-
-	void reset(void);              // initializefor new 'file'
-	void setFType(int16 dft);     // set the file type
-
-	size_t readb(Buffer *sb, Buffer *tb);
-	bool openb(Buffer *sb, Buffer *tb);
-
-	bool beof(void) {
-		return deceof;
-	}
-	bool berr(void) {
-		return decerr;
-	}
-	bool weof(void) {
-		return fileo->laden();
-	}
-	bool werr(void) {
-		return deserr;
-	}
-
-};
-
-/* ===================================================================== *
-    File Emulation for buffers
- * ===================================================================== */
-
-Buffer *buffopen(char n[], char att[]);           // emulate fopen
-size_t buffread(void *, size_t, size_t, Buffer *);   // emulate fread
-int buffgetc(Buffer *);                           // emulate fgetc
-char buffputc(char, Buffer *);                     // emulate fputc
-int16 buffclose(Buffer *);                        // emulate fclose
-size_t buffwrite(void *, size_t, size_t, Buffer *);  // emulate fwrite
-
-} // end of namespace Saga2
-
-#endif  //DECOMP_H
diff --git a/engines/saga2/audiodec.h b/engines/saga2/audiodec.h
deleted file mode 100644
index db967c1dec..0000000000
--- a/engines/saga2/audiodec.h
+++ /dev/null
@@ -1,205 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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.
- *
- *
- * Based on the original sources
- *   Faery Tale II -- The Halls of the Dead
- *   (c) 1993-1996 The Wyrmkeep Entertainment Co.
- */
-
-#ifndef SAGA2_AUDIODEC_H
-#define SAGA2_AUDIODEC_H
-
-namespace Saga2 {
-
-class Buffer;
-class audioInterface;
-class soundDecoder;
-class soundSample;
-class workBuffer;
-class soundQueue;
-
-/* ===================================================================== *
-
-   Sound Sample Decoders
-     These are audio buffer decoders & fillers used in playback.
-     They are intended to be chained together.
-     They come in three flavors:
-
-     decodeInPlace - which operate on existing buffers
-       mute() - zeroes out buffer
-
-     decodeBuffer  - which require work buffers
-       unShorten() - undoes Shorten 1.22 compression
-       thunk8to16() - converts 8 bit samples to 16 bit
-
-     decodeSource - aliases to soundSource calls
-
-   NOTE : If you are trying to follow the flow of the code, and you get
-     lost around here, you can probably pick things up again in the
-     audiofnc modules or in some locally defined decoders
-
- * ===================================================================== */
-
-enum soundDecoderType {
-	decodeInPlace,
-	decodeBuffer,
-	decodeSource
-};
-
-typedef int16 INPLACEDECODER(Buffer &, soundDecoder *, soundSample &);
-typedef int16 BUFFERDECODER(Buffer &, soundDecoder *, soundSample &, workBuffer *);
-typedef int16 BUFFERLOADER(Buffer &, soundSample &);
-
-union soundServer {
-	INPLACEDECODER  *pDec;
-	BUFFERDECODER   *bDec;
-	BUFFERLOADER    *lDec;
-
-	soundServer() {
-		pDec = NULL;
-	}
-	soundServer(soundDecoderType sdt, void *fn) {
-		switch (sdt)   {
-		case decodeInPlace:
-			pDec = (INPLACEDECODER *) fn;
-			break;
-		case decodeBuffer :
-			bDec = (BUFFERDECODER *)  fn;
-			break;
-		case decodeSource :
-			lDec = (BUFFERLOADER *)   fn;
-			break;
-		}
-	}
-	soundServer(const soundServer &src)         {
-		pDec = src.pDec;
-	}
-	soundServer &operator=(const soundServer &src)     {
-		this->pDec = src.pDec;
-		return *this;
-	}
-	inline bool operator==(const soundServer &src2) const {
-		return pDec == src2.pDec;
-	}
-	inline operator bool() const {
-		return pDec != NULL;
-	}
-};
-
-/*******************************************************************/
-/* Decoder status flags                                            */
-
-enum decoderStatuses {
-	msgBufferFull   = 1 << 0,   // targetbuffer filled
-	msgSegmentEnd   = 1 << 1,   // source segment exhausted
-	msgBufferFree   = 1 << 2,   // waiting for a free buffer
-	msgSamplePause  = 1 << 3,   // partial load - continue next time
-	msgSampleDone   = 1 << 4,   // sample complete
-	msgWaitForBuffer = 1 << 5,  // waiting for free buffer
-	msgIOError      = 1 << 6    // an I/O error occurred reading the file
-};
-
-class soundDecoder {
-	bool                inUse;      // to avoid buffer tangles
-	soundDecoderType    type;       // in-place, buffered, loader
-	soundServer         openf;      // open/seek function
-	soundServer         readf;      // read/load function
-	soundServer         closef;     // close function
-
-public:
-	soundDecoder        *next;      // linked list
-	workBuffer          *wkBuffer;  // pointer to work buffer ( if any )
-
-private:
-	soundDecoder();
-public:
-	soundDecoder(INPLACEDECODER, INPLACEDECODER, INPLACEDECODER);
-	soundDecoder(BUFFERDECODER, BUFFERDECODER, BUFFERDECODER, int16, audioInterface *, int16);
-	soundDecoder(BUFFERLOADER, BUFFERLOADER, BUFFERLOADER);
-	~soundDecoder(void);
-	soundDecoder &operator=(const soundDecoder &src);
-	soundDecoder(const soundDecoder &src);
-	bool operator==(const soundDecoder &src2) const;
-	inline operator bool() const {
-		warning("STUB: soundDecoder::bool()");
-		return true;
-	}
-
-	void setNext(soundDecoder *sd) {
-		next = sd;
-	}
-
-	int16 use(Buffer &, soundDecoder *, soundSample &);
-	int16 seek(Buffer &, soundDecoder *, soundSample &);
-	int16 flush(Buffer &, soundDecoder *, soundSample &);
-
-	void reset(void);
-
-	//void notBusy( void );              // idle time function
-
-};
-
-
-/*******************************************************************/
-/*                                                                 */
-/* DecoderSet class : class used to process sound                  */
-/*                                                                 */
-/*******************************************************************/
-
-class decoderSet { //: private DList
-public:
-	soundDecoder            *decode;
-
-	decoderSet(void) {
-		decode = NULL;
-	}
-	~decoderSet(void) {
-		if (decode) delete decode;
-		decode = NULL;
-	}
-
-	void addDecoder(soundDecoder *sodec);
-
-#if DEBUG_AUDIO
-	void check(void);
-#else
-	inline void check(void) {}
-#endif
-
-	void reset(void);
-	void format(soundSample *ss);   // set various sound attribs.
-
-	int16 openCall(Buffer *sobu, soundQueue *queue);
-	int16 openCall(Buffer *sobu, soundSample *queue);
-
-	int16 loadCall(Buffer *sobu, soundQueue *queue);
-	int16 loadCall(Buffer *sobu, soundSample *queue);
-
-	int16 closeCall(Buffer *sobu, soundQueue *queue);
-	int16 closeCall(Buffer *sobu, soundSample *queue);
-
-private:
-	//void notBusy( void );              // idle time function
-};
-
-} // end of namespace Saga2
-
-#endif
diff --git a/engines/saga2/audiofnc.h b/engines/saga2/audiofnc.h
deleted file mode 100644
index 227b98f452..0000000000
--- a/engines/saga2/audiofnc.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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.
- *
- *
- * Based on the original sources
- *   Faery Tale II -- The Halls of the Dead
- *   (c) 1993-1996 The Wyrmkeep Entertainment Co.
- */
-
-#ifndef SAGA2_AUDIOFNC_H
-#define SAGA2_AUDIOFNC_H
-
-namespace Saga2 {
-
-/* ===================================================================== *
-   DECODERS
-     Decoders are generally declared in groups of three functions
-     - An Open/Seek routine to prepare for reading
-     - A Read routine to move the actual data
-     - A Flush/Close routine to clean up
-
-     Three types of decoder currently exist
-     - In Place Decoders : operate on a buffer in place
-     - Buffered Decoders : require a temporary work buffer
-     - Buffer Loaders    : read buffers from disk etc.
- * ===================================================================== */
-
-
-/*******************************************************************/
-/* Declaration Macros                                              */
-
-#define INPLACEDEC( procname ) \
-	int16 procname( Buffer &sb, soundDecoder *sd, soundSample &ss )
-#define BUFFERDEC( procname ) \
-	int16 procname( Buffer &sb, soundDecoder *sd, soundSample &ss, workBuffer *wb )
-#define BUFFERLOD( procname ) \
-	int16 procname( Buffer &sb, soundSample &ss )
-
-/*******************************************************************/
-/* LOADERS                                                         */
-
-// static buffer source
-
-BUFFERLOD(seekBuffer);
-BUFFERLOD(readBuffer);
-BUFFERLOD(flushBuffer);
-
-// FILE* source
-
-BUFFERLOD(readFile);
-BUFFERLOD(seekFile);
-BUFFERLOD(flushFile);
-
-/*******************************************************************/
-/* TRANSLATORS                                                     */
-
-INPLACEDEC(stereoToMonoSeek);
-INPLACEDEC(stereoToMono);
-INPLACEDEC(stereoToMonoFlush);
-
-
-/*******************************************************************/
-/* BUFFERED DECODERS                                               */
-
-BUFFERDEC(readDecompress);
-BUFFERDEC(seekDecompress);
-BUFFERDEC(flushDecompress);
-
-} // end of namespace Saga2
-
-#endif
diff --git a/engines/saga2/audiores.cpp b/engines/saga2/audiores.cpp
index 71da54b526..d63835f3e4 100644
--- a/engines/saga2/audiores.cpp
+++ b/engines/saga2/audiores.cpp
@@ -27,7 +27,6 @@
 #include "saga2/saga2.h"
 #include "saga2/audio.h"
 #include "saga2/hresmgr.h"
-#include "saga2/audiodec.h"
 #include "saga2/rect.h"
 
 #include "saga2/queues.h"
@@ -75,117 +74,4 @@ bool hResCheckResID(hResContext *hrc, uint32 s[]) {
 	return true;
 }
 
-/* ===================================================================== *
-   HRes loader code
- * ===================================================================== */
-
-
-
-
-//-----------------------------------------------------------------------
-//	open / seek
-
-int16 hResSeek(Buffer &sb, soundSample &ss, hResContext *hrc, bool Cheksize) {
-	if (hrc->seek(ss.curSeg) == false) {
-		warning("Audio: %d is an invalid res ID", ss.curSeg);
-		return 1;
-	}
-	if (Cheksize && sb.wSize < hrc->bytesleft()) {
-		int bufferSize = sb.wSize;
-		int soundSize = hrc->bytesleft();
-
-		warning("Buffer too small %d sample: %d", bufferSize, soundSize);
-		return 1;
-	}
-	ss.channels = soundSample::channelMono;
-	ss.speed = soundRate22K;
-	ss.dataSize = soundSample::granularity16Bit;
-	return 0;
-}
-
-//-----------------------------------------------------------------------
-//	read
-
-int16 hResRead(Buffer &sb, soundSample &ss, hResContext *hrc) {
-	size_t bread;
-	size_t count = MIN<uint>(sb.wSize, hrc->bytesleft());
-	int16 rVal = 0;
-
-#if ASYNCH_AUDIO
-	bool partial = false;
-	count = min(count, ASYNCH_READ_SIZE);
-	if (count > ASYNCH_READ_SIZE) {
-		count = ASYNCH_READ_SIZE;
-		partial = true;
-	}
-#endif
-
-	bread = hrc->readbytes(sb.wData, count);
-	sb.gave(bread);
-
-	assert(bread <= count);
-
-#if ASYNCH_AUDIO
-	if (partial)
-		rVal |= msgSamplePause;
-#endif
-	if (bread == count)
-		rVal |= msgBufferFull;
-	if (hrc->eor())
-		rVal |= msgSegmentEnd;
-	return rVal;
-}
-
-//-----------------------------------------------------------------------
-//	flush / close
-
-int16 hResFlush(Buffer &sb, soundSample &ss, hResContext *hrc) {
-	return 0;
-}
-
-/* ===================================================================== *
-   In memory loader code
- * ===================================================================== */
-
-//-----------------------------------------------------------------------
-//	open / seek
-
-int16 bufSeek(Buffer &sb, soundSample &ss) {
-	if (ss.curSeg >= maxClicks) {
-		warning("bufSeek: open failed");
-		return 1;
-	}
-	ss.channels = soundSample::channelMono;
-	ss.speed = soundRate22K;
-	ss.dataSize = soundSample::granularity16Bit;
-	return 0;
-}
-
-//-----------------------------------------------------------------------
-//	read
-
-int16 bufRead(Buffer &sb, soundSample &ss) {
-	size_t bread;
-	size_t count = MIN<uint>(sb.wSize, clickSizes[ss.curSeg]);
-	int16 rVal = 0;
-
-	bread = count;
-	memcpy(sb.wData, clickData[ss.curSeg], count);
-	sb.gave(bread);
-
-	assert(bread <= count);
-
-	if (bread == count)
-		rVal |= msgBufferFull;
-	rVal |= msgSegmentEnd;
-	return rVal;
-}
-
-//-----------------------------------------------------------------------
-//	flush / close
-
-int16 bufFlush(Buffer &sb, soundSample &ss) {
-	return 0;
-}
-
 } // end of namespace Saga2
diff --git a/engines/saga2/audiosmp.h b/engines/saga2/audiosmp.h
index a775948595..d7388500ed 100644
--- a/engines/saga2/audiosmp.h
+++ b/engines/saga2/audiosmp.h
@@ -29,8 +29,6 @@
 
 namespace Saga2 {
 
-class decoderSet;
-
 /* ===================================================================== *
 
    Sound Sample Attributes
@@ -111,7 +109,6 @@ public:
 	soundSegment            curSeg;
 	soundSegment            headSeg;
 	void                    *sourceBuffer;
-	decoderSet              *decoder;
 	PublicQueue<uint32>     segmentList;
 
 	soundSample(soundSegment sa[]);  //, sampleLocation pos=Point32( 0, 0 ));
diff --git a/engines/saga2/audiosys.h b/engines/saga2/audiosys.h
index 47032cd6dd..25802fb3c3 100644
--- a/engines/saga2/audiosys.h
+++ b/engines/saga2/audiosys.h
@@ -313,7 +313,7 @@ public:
 
 
 private:
-	void playMusic(decoderSet *decList, BufferRequest targBuffer, positionedSample *ss, int16 loopFactor);
+	void playMusic(BufferRequest targBuffer, positionedSample *ss, int16 loopFactor);
 
 	void setSoundMasterVolume(Volume val);
 	void setMusicMasterVolume(Volume val);
diff --git a/engines/saga2/noise.cpp b/engines/saga2/noise.cpp
index 1b351ab2b4..6afe9d48a5 100644
--- a/engines/saga2/noise.cpp
+++ b/engines/saga2/noise.cpp
@@ -31,8 +31,6 @@
 #include "saga2/fta.h"
 #include "saga2/audio.h"
 #include "saga2/audiores.h"
-#include "saga2/audiodec.h"
-#include "saga2/audiofnc.h"
 #include "saga2/annoy.h"
 #include "saga2/player.h"
 #include "saga2/queues.h"
@@ -77,16 +75,6 @@ extern uint8            *clickData[];
 soundSegment            currentMidi;
 soundSegment            currentLoop;
 
-//-----------------------------------------------------------------------
-//	decoder sets
-
-decoderSet              *voiceDec,
-                        *soundDec,
-                        *longSoundDec,
-                        *musicDec,
-                        *loopDec,
-                        *memDec;
-
 //-----------------------------------------------------------------------
 //	resource contexts
 
@@ -125,68 +113,6 @@ bool bufCheckResID(hResContext *hrc, uint32 s);
 bool hResCheckResID(hResContext *hrc, uint32 s);
 bool hResCheckResID(hResContext *hrc, uint32 s[]);
 
-/* ===================================================================== *
-   Decoder routines
- * ===================================================================== */
-
-//-----------------------------------------------------------------------
-//	Specific DECODER routines
-
-BUFFERLOD(seekMusic)   {
-	return hResSeek(sb, ss, musicRes, true);
-}
-BUFFERLOD(readMusic)   {
-	return hResRead(sb, ss, musicRes);
-}
-BUFFERLOD(flushMusic)  {
-	return hResFlush(sb, ss, musicRes);
-}
-BUFFERLOD(seekLongSound)   {
-	return hResSeek(sb, ss, longRes, false);
-}
-BUFFERLOD(readLongSound)   {
-	return hResRead(sb, ss, longRes);
-}
-BUFFERLOD(flushLongSound)  {
-	return hResFlush(sb, ss, longRes);
-}
-BUFFERLOD(seekSound)   {
-	return hResSeek(sb, ss, soundRes, true);
-}
-BUFFERLOD(readSound)   {
-	return hResRead(sb, ss, soundRes);
-}
-BUFFERLOD(flushSound)  {
-	return hResFlush(sb, ss, soundRes);
-}
-BUFFERLOD(seekLoop)   {
-	return hResSeek(sb, ss, loopRes, true);
-}
-BUFFERLOD(readLoop)   {
-	return hResRead(sb, ss, loopRes);
-}
-BUFFERLOD(flushLoop)  {
-	return hResFlush(sb, ss, loopRes);
-}
-BUFFERLOD(seekVoice)   {
-	return hResSeek(sb, ss, voiceRes, false);
-}
-BUFFERLOD(readVoice)   {
-	return hResRead(sb, ss, voiceRes);
-}
-BUFFERLOD(flushVoice)  {
-	return hResFlush(sb, ss, voiceRes);
-}
-BUFFERLOD(seekMemSound)   {
-	return bufSeek(sb, ss);
-}
-BUFFERLOD(readMemSound)   {
-	return bufRead(sb, ss);
-}
-BUFFERLOD(flushMemSound)  {
-	return bufFlush(sb, ss);
-}
-
 /* ===================================================================== *
    ATTENUATOR routines
  * ===================================================================== */
@@ -224,25 +150,6 @@ void startAudio(void) {
 	bool disVoice = true, disMusic = true, disSound = true, disLoops = true;
 
 	if (audio->active()) {
-		voiceDec = new decoderSet();
-		voiceDec->addDecoder(new soundDecoder(&readVoice, &seekVoice, &flushVoice));
-		voiceDec->addDecoder(new soundDecoder(&readDecompress, &seekDecompress, &flushDecompress, 16384, audio, 1));
-
-		musicDec = new decoderSet();
-		musicDec->addDecoder(new soundDecoder(&readMusic, &seekMusic, &flushMusic));
-
-		soundDec = new decoderSet();
-		soundDec->addDecoder(new soundDecoder(&readSound, &seekSound, &flushSound));
-
-		longSoundDec = new decoderSet();
-		longSoundDec->addDecoder(new soundDecoder(&readLongSound, &seekLongSound, &flushLongSound));
-
-		loopDec = new decoderSet();
-		loopDec->addDecoder(new soundDecoder(&readLoop, &seekLoop, &flushLoop));
-
-		memDec = new decoderSet();
-		memDec->addDecoder(new soundDecoder(&readMemSound, &seekMemSound, &flushMemSound));
-
 		uint32 musicID = haveKillerSoundCard() ? goodMusicID : baseMusicID;
 
 		disVoice = !ConfMan.getInt("speech_volume");




More information about the Scummvm-git-logs mailing list