diff options
author | Max Horn | 2003-12-21 01:17:03 +0000 |
---|---|---|
committer | Max Horn | 2003-12-21 01:17:03 +0000 |
commit | 7fbb3e05597e88d0421af2f720ec7d136605836e (patch) | |
tree | ff31a330fff91117d54944c9f7a733ab8e641ab6 /sound/mixer.cpp | |
parent | 2bbaff0890b2f5920052257d7297daa72bb09606 (diff) | |
download | scummvm-rg350-7fbb3e05597e88d0421af2f720ec7d136605836e.tar.gz scummvm-rg350-7fbb3e05597e88d0421af2f720ec7d136605836e.tar.bz2 scummvm-rg350-7fbb3e05597e88d0421af2f720ec7d136605836e.zip |
Cleaned up SoundMixer::newStream() a bit (I plan to replace all usages of this by playInputStream(), this cleanup eases this a bit)
svn-id: r11803
Diffstat (limited to 'sound/mixer.cpp')
-rw-r--r-- | sound/mixer.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp index a539cfc510..6f43a4c5f9 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -94,7 +94,7 @@ public: class ChannelStream : public Channel { public: - ChannelStream(SoundMixer *mixer, PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags, uint32 buffer_size, byte volume, int8 pan); + ChannelStream(SoundMixer *mixer, PlayingSoundHandle *handle, uint rate, byte flags, uint32 buffer_size, byte volume, int8 pan); void append(void *sound, uint32 size); void finish(); @@ -149,9 +149,9 @@ void SoundMixer::setupPremix(PremixProc *proc, void *param) { _premixProc = proc; } -void SoundMixer::newStream(PlayingSoundHandle *handle, void *sound, uint32 size, uint rate, byte flags, uint32 buffer_size, byte volume, int8 pan) { +void SoundMixer::newStream(PlayingSoundHandle *handle, uint rate, byte flags, uint32 buffer_size, byte volume, int8 pan) { Common::StackLock lock(_mutex); - insertChannel(handle, new ChannelStream(this, handle, sound, size, rate, flags, buffer_size, volume, pan)); + insertChannel(handle, new ChannelStream(this, handle, rate, flags, buffer_size, volume, pan)); } void SoundMixer::appendStream(PlayingSoundHandle handle, void *sound, uint32 size) { @@ -496,16 +496,10 @@ void Channel::mix(int16 *data, uint len) { } ChannelStream::ChannelStream(SoundMixer *mixer, PlayingSoundHandle *handle, - void *sound, uint32 size, uint rate, - byte flags, uint32 buffer_size, byte volume, int8 pan) + uint rate, byte flags, uint32 buffer_size, byte volume, int8 pan) : Channel(mixer, handle, true, volume, pan) { - assert(size <= buffer_size); - // Create the input stream _input = makeWrappedInputStream(rate, flags, buffer_size); - - // Append the initial data - append(sound, size); // Get a rate converter instance _converter = makeRateConverter(_input->getRate(), mixer->getOutputRate(), _input->isStereo(), (flags & SoundMixer::FLAG_REVERSE_STEREO) != 0); |