aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorJohannes Schickel2011-10-09 20:57:25 +0200
committerJohannes Schickel2011-10-09 21:24:00 +0200
commitd4f54a2c97ca5bff03846eca09882b17e0c3a3fa (patch)
tree31aa3a9aed85d28fa4f9040a7cb56e5bf539b120 /audio
parent221434a83f3bcddb7b1cff884027eaef1941bd99 (diff)
downloadscummvm-rg350-d4f54a2c97ca5bff03846eca09882b17e0c3a3fa.tar.gz
scummvm-rg350-d4f54a2c97ca5bff03846eca09882b17e0c3a3fa.tar.bz2
scummvm-rg350-d4f54a2c97ca5bff03846eca09882b17e0c3a3fa.zip
AUDIO: Strip out some unused VOC code.
Diffstat (limited to 'audio')
-rw-r--r--audio/decoders/voc.cpp26
1 files changed, 6 insertions, 20 deletions
diff --git a/audio/decoders/voc.cpp b/audio/decoders/voc.cpp
index c5023f8be6..f06e7f95f2 100644
--- a/audio/decoders/voc.cpp
+++ b/audio/decoders/voc.cpp
@@ -47,7 +47,7 @@ int getSampleRateFromVOCRate(int vocSR) {
}
}
-static byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate, int &loops, int &begin_loop, int &end_loop) {
+byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate) {
VocFileHeader fileHeader;
debug(2, "loadVOCFromStream");
@@ -84,8 +84,6 @@ static byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate,
int len;
byte *ret_sound = 0;
size = 0;
- begin_loop = 0;
- end_loop = 0;
while ((code = stream.readByte())) {
len = stream.readByte();
@@ -128,8 +126,6 @@ static byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate,
}
stream.read(ret_sound + size, len);
size += len;
- begin_loop = size;
- end_loop = size;
} else {
warning("VOC file packing %d unsupported", packing);
}
@@ -144,7 +140,7 @@ static byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate,
break;
case 6: // begin of loop
assert(len == 2);
- loops = stream.readUint16LE();
+ stream.readUint16LE();
break;
case 7: // end of loop
assert(len == 0);
@@ -173,15 +169,9 @@ static byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate,
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);
-}
-
-
#ifdef STREAM_AUDIO_FROM_DISK
-int parseVOCFormat(Common::SeekableReadStream& stream, RawStreamBlock* block, int &rate, int &loops, int &begin_loop, int &end_loop) {
+int parseVOCFormat(Common::SeekableReadStream& stream, RawStreamBlock* block, int &rate) {
VocFileHeader fileHeader;
int currentBlock = 0;
int size = 0;
@@ -219,8 +209,6 @@ int parseVOCFormat(Common::SeekableReadStream& stream, RawStreamBlock* block, in
int len;
size = 0;
- begin_loop = 0;
- end_loop = 0;
while ((code = stream.readByte())) {
len = stream.readByte();
@@ -261,8 +249,6 @@ int parseVOCFormat(Common::SeekableReadStream& stream, RawStreamBlock* block, in
stream.seek(len, SEEK_CUR);
size += len;
- begin_loop = size;
- end_loop = size;
} else {
warning("VOC file packing %d unsupported", packing);
}
@@ -277,7 +263,7 @@ int parseVOCFormat(Common::SeekableReadStream& stream, RawStreamBlock* block, in
break;
case 6: // begin of loop
assert(len == 2);
- loops = stream.readUint16LE();
+ stream.readUint16LE();
break;
case 7: // end of loop
assert(len == 0);
@@ -304,9 +290,9 @@ SeekableAudioStream *makeVOCDiskStreamNoLoop(Common::SeekableReadStream *stream,
const int MAX_AUDIO_BLOCKS = 256;
RawStreamBlock *block = new RawStreamBlock[MAX_AUDIO_BLOCKS];
- int rate, loops, begin_loop, end_loop;
+ int rate;
- int numBlocks = parseVOCFormat(*stream, block, rate, loops, begin_loop, end_loop);
+ int numBlocks = parseVOCFormat(*stream, block, rate);
SeekableAudioStream *audioStream = 0;