aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/decoders/adpcm.cpp2
-rw-r--r--audio/decoders/adpcm.h4
-rw-r--r--audio/decoders/adpcm_intern.h4
-rw-r--r--audio/decoders/wave.cpp2
-rw-r--r--audio/decoders/wave.h6
-rw-r--r--audio/mods/maxtrax.cpp2
6 files changed, 11 insertions, 9 deletions
diff --git a/audio/decoders/adpcm.cpp b/audio/decoders/adpcm.cpp
index fe5eec5dcc..fd97d5d109 100644
--- a/audio/decoders/adpcm.cpp
+++ b/audio/decoders/adpcm.cpp
@@ -433,7 +433,7 @@ int16 Ima_ADPCMStream::decodeIMA(byte code, int channel) {
return samp;
}
-RewindableAudioStream *makeADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, ADPCMType type, int rate, int channels, uint32 blockAlign) {
+SeekableAudioStream *makeADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, ADPCMType type, int rate, int channels, uint32 blockAlign) {
// If size is 0, report the entire size of the stream
if (!size)
size = stream->size();
diff --git a/audio/decoders/adpcm.h b/audio/decoders/adpcm.h
index 650bc341b3..353fd3b71d 100644
--- a/audio/decoders/adpcm.h
+++ b/audio/decoders/adpcm.h
@@ -45,7 +45,7 @@ class SeekableReadStream;
namespace Audio {
class PacketizedAudioStream;
-class RewindableAudioStream;
+class SeekableAudioStream;
// There are several types of ADPCM encoding, only some are supported here
// For all the different encodings, refer to:
@@ -74,7 +74,7 @@ enum ADPCMType {
* @param blockAlign block alignment ???
* @return a new RewindableAudioStream, or NULL, if an error occurred
*/
-RewindableAudioStream *makeADPCMStream(
+SeekableAudioStream *makeADPCMStream(
Common::SeekableReadStream *stream,
DisposeAfterUse::Flag disposeAfterUse,
uint32 size, ADPCMType type,
diff --git a/audio/decoders/adpcm_intern.h b/audio/decoders/adpcm_intern.h
index 92be704cca..3a2af91c90 100644
--- a/audio/decoders/adpcm_intern.h
+++ b/audio/decoders/adpcm_intern.h
@@ -39,7 +39,7 @@
namespace Audio {
-class ADPCMStream : public RewindableAudioStream {
+class ADPCMStream : public SeekableAudioStream {
protected:
Common::DisposablePtr<Common::SeekableReadStream> _stream;
int32 _startpos;
@@ -67,6 +67,8 @@ public:
virtual int getRate() const { return _rate; }
virtual bool rewind();
+ virtual bool seek(const Timestamp &where) { return false; }
+ virtual Timestamp getLength() const { return -1; }
/**
* This table is used by some ADPCM variants (IMA and OKI) to adjust the
diff --git a/audio/decoders/wave.cpp b/audio/decoders/wave.cpp
index adee749b37..cdd6412aa8 100644
--- a/audio/decoders/wave.cpp
+++ b/audio/decoders/wave.cpp
@@ -158,7 +158,7 @@ bool loadWAVFromStream(Common::SeekableReadStream &stream, int &size, int &rate,
return true;
}
-RewindableAudioStream *makeWAVStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse) {
+SeekableAudioStream *makeWAVStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse) {
int size, rate;
byte flags;
uint16 type;
diff --git a/audio/decoders/wave.h b/audio/decoders/wave.h
index 6bc9f72101..a7fb76978c 100644
--- a/audio/decoders/wave.h
+++ b/audio/decoders/wave.h
@@ -56,7 +56,7 @@ class SeekableReadStream;
namespace Audio {
-class RewindableAudioStream;
+class SeekableAudioStream;
/**
* Try to load a WAVE from the given seekable stream. Returns true if
@@ -82,9 +82,9 @@ extern bool loadWAVFromStream(
*
* @param stream the SeekableReadStream from which to read the WAVE data
* @param disposeAfterUse whether to delete the stream after use
- * @return a new RewindableAudioStream, or NULL, if an error occurred
+ * @return a new SeekableAudioStream, or NULL, if an error occurred
*/
-RewindableAudioStream *makeWAVStream(
+SeekableAudioStream *makeWAVStream(
Common::SeekableReadStream *stream,
DisposeAfterUse::Flag disposeAfterUse);
diff --git a/audio/mods/maxtrax.cpp b/audio/mods/maxtrax.cpp
index f5754a5f96..b0cdaef95a 100644
--- a/audio/mods/maxtrax.cpp
+++ b/audio/mods/maxtrax.cpp
@@ -708,7 +708,7 @@ int8 MaxTrax::noteOn(ChannelContext &channel, const byte note, uint16 volume, ui
voiceNum = pickvoice((channel.flags & ChannelContext::kFlagRightChannel) != 0 ? 1 : 0, pri);
} else {
VoiceContext *voice = ARRAYEND(_voiceCtx);
- for (voiceNum = ARRAYSIZE(_voiceCtx); voiceNum-- != 0 && --voice->channel != &channel;)
+ for (voiceNum = ARRAYSIZE(_voiceCtx); voiceNum >= 0 && voice->channel != &channel; voiceNum--, voice--)
;
if (voiceNum < 0)
voiceNum = pickvoice((channel.flags & ChannelContext::kFlagRightChannel) != 0 ? 1 : 0, pri);