aboutsummaryrefslogtreecommitdiff
path: root/sound/mixer.cpp
diff options
context:
space:
mode:
authorMax Horn2004-01-03 14:10:13 +0000
committerMax Horn2004-01-03 14:10:13 +0000
commitbfea71b0c46ea93b80ee2f6f08ba29ba8768171a (patch)
tree734b6137e4aaaa043d5db905dc67700bcdc7daa4 /sound/mixer.cpp
parent2a6745a9862fc067a7b529feec0943ec56c79c7c (diff)
downloadscummvm-rg350-bfea71b0c46ea93b80ee2f6f08ba29ba8768171a.tar.gz
scummvm-rg350-bfea71b0c46ea93b80ee2f6f08ba29ba8768171a.tar.bz2
scummvm-rg350-bfea71b0c46ea93b80ee2f6f08ba29ba8768171a.zip
renamed AudioInputStream -> AudioStream
svn-id: r12110
Diffstat (limited to 'sound/mixer.cpp')
-rw-r--r--sound/mixer.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index 1312e11c38..ff414e46c5 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -52,12 +52,12 @@ private:
protected:
RateConverter *_converter;
- AudioInputStream *_input;
+ AudioStream *_input;
public:
Channel(SoundMixer *mixer, PlayingSoundHandle *handle, bool isMusic, byte volume, int8 pan, int id = -1);
- Channel(SoundMixer *mixer, PlayingSoundHandle *handle, AudioInputStream *input, bool autofreeStream, bool isMusic, byte volume, int8 pan, bool reverseStereo = false, int id = -1);
+ Channel(SoundMixer *mixer, PlayingSoundHandle *handle, AudioStream *input, bool autofreeStream, bool isMusic, byte volume, int8 pan, bool reverseStereo = false, int id = -1);
virtual ~Channel();
void mix(int16 *data, uint len);
@@ -229,7 +229,7 @@ void SoundMixer::playRaw(PlayingSoundHandle *handle, void *sound, uint32 size, u
}
// Create the input stream
- AudioInputStream *input;
+ AudioStream *input;
if (flags & SoundMixer::FLAG_LOOP) {
if (loopEnd == 0) {
input = makeLinearInputStream(rate, flags, (byte *)sound, size, 0, size);
@@ -249,7 +249,7 @@ void SoundMixer::playRaw(PlayingSoundHandle *handle, void *sound, uint32 size, u
#ifdef USE_MAD
void SoundMixer::playMP3(PlayingSoundHandle *handle, File *file, uint32 size, byte volume, int8 pan, int id) {
// Create the input stream
- AudioInputStream *input = makeMP3Stream(file, size);
+ AudioStream *input = makeMP3Stream(file, size);
playInputStream(handle, input, false, volume, pan, id);
}
#endif
@@ -257,12 +257,12 @@ void SoundMixer::playMP3(PlayingSoundHandle *handle, File *file, uint32 size, by
#ifdef USE_VORBIS
void SoundMixer::playVorbis(PlayingSoundHandle *handle, File *file, uint32 size, byte volume, int8 pan, int id) {
// Create the input stream
- AudioInputStream *input = makeVorbisStream(file, size);
+ AudioStream *input = makeVorbisStream(file, size);
playInputStream(handle, input, false, volume, pan, id);
}
#endif
-void SoundMixer::playInputStream(PlayingSoundHandle *handle, AudioInputStream *input, bool isMusic, byte volume, int8 pan, int id, bool autofreeStream) {
+void SoundMixer::playInputStream(PlayingSoundHandle *handle, AudioStream *input, bool isMusic, byte volume, int8 pan, int id, bool autofreeStream) {
Common::StackLock lock(_mutex);
if (input == 0) {
@@ -467,7 +467,7 @@ Channel::Channel(SoundMixer *mixer, PlayingSoundHandle *handle, bool isMusic,
assert(mixer);
}
-Channel::Channel(SoundMixer *mixer, PlayingSoundHandle *handle, AudioInputStream *input,
+Channel::Channel(SoundMixer *mixer, PlayingSoundHandle *handle, AudioStream *input,
bool autofreeStream, bool isMusic, byte volume, int8 pan, bool reverseStereo, int id)
: _mixer(mixer), _handle(handle), _autofreeStream(autofreeStream), _isMusic(isMusic),
_volume(volume), _pan(pan), _paused(false), _id(id), _converter(0), _input(input) {
@@ -519,16 +519,16 @@ ChannelStream::ChannelStream(SoundMixer *mixer, PlayingSoundHandle *handle,
uint rate, byte flags, uint32 buffer_size, byte volume, int8 pan)
: Channel(mixer, handle, true, volume, pan) {
// Create the input stream
- _input = makeWrappedInputStream(rate, flags, buffer_size);
+ _input = makeAppendableAudioStream(rate, flags, buffer_size);
// Get a rate converter instance
_converter = makeRateConverter(_input->getRate(), mixer->getOutputRate(), _input->isStereo(), (flags & SoundMixer::FLAG_REVERSE_STEREO) != 0);
}
void ChannelStream::finish() {
- ((WrappedAudioInputStream *)_input)->finish();
+ ((AppendableAudioStream *)_input)->finish();
}
void ChannelStream::append(void *data, uint32 len) {
- ((WrappedAudioInputStream *)_input)->append((const byte *)data, len);
+ ((AppendableAudioStream *)_input)->append((const byte *)data, len);
}