diff options
author | Max Horn | 2010-04-12 09:14:17 +0000 |
---|---|---|
committer | Max Horn | 2010-04-12 09:14:17 +0000 |
commit | a1840bd5732473e3144857c74716ec2d6e4338c2 (patch) | |
tree | 97a63044cc6cf8617172af41857b6e19fa324d20 | |
parent | 9191b9d5289b99b197fee8b9234080d03d2194c3 (diff) | |
download | scummvm-rg350-a1840bd5732473e3144857c74716ec2d6e4338c2.tar.gz scummvm-rg350-a1840bd5732473e3144857c74716ec2d6e4338c2.tar.bz2 scummvm-rg350-a1840bd5732473e3144857c74716ec2d6e4338c2.zip |
AUDIO: Rename Mixer::playInputStream to playStream
svn-id: r48637
81 files changed, 145 insertions, 145 deletions
diff --git a/engines/agi/preagi.cpp b/engines/agi/preagi.cpp index f92d5e8aa0..d455bc9dc4 100644 --- a/engines/agi/preagi.cpp +++ b/engines/agi/preagi.cpp @@ -118,7 +118,7 @@ void PreAgiEngine::initialize() { //_sound->initSound(); _speakerStream = new Audio::PCSpeaker(_mixer->getOutputRate()); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_speakerHandle, + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_speakerHandle, _speakerStream, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp index 6b3ecab8f0..f46c6dae17 100644 --- a/engines/agi/sound.cpp +++ b/engines/agi/sound.cpp @@ -487,7 +487,7 @@ int SoundMgr::initSound() { report("disabled\n"); } - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); return r; } diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 0859bc9da3..8155bfb8d9 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -313,7 +313,7 @@ void MoviePlayerDXA::startSound() { if (_bgSoundStream != NULL) { _vm->_mixer->stopHandle(_bgSound); - _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_bgSound, _bgSoundStream); + _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_bgSound, _bgSoundStream); } } diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp index 00d677727d..06dfab1ecd 100644 --- a/engines/agos/res_snd.cpp +++ b/engines/agos/res_snd.cpp @@ -221,7 +221,7 @@ void AGOSEngine::playModule(uint16 music) { audioStream = Audio::makeProtrackerStream(&f); } - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_modHandle, audioStream); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_modHandle, audioStream); } void AGOSEngine_Simon1::playMusic(uint16 music, uint16 track) { diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp index 84b0eebe69..bd4c89a404 100644 --- a/engines/agos/sound.cpp +++ b/engines/agos/sound.cpp @@ -242,7 +242,7 @@ Audio::AudioStream *WavSound::makeAudioStream(uint sound) { void WavSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, bool loop, int vol) { convertVolume(vol); - _mixer->playInputStream(type, handle, new LoopingAudioStream(this, sound, loopSound, loop), -1, vol); + _mixer->playStream(type, handle, new LoopingAudioStream(this, sound, loopSound, loop), -1, vol); } /////////////////////////////////////////////////////////////////////////////// @@ -265,7 +265,7 @@ Audio::AudioStream *VocSound::makeAudioStream(uint sound) { void VocSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, bool loop, int vol) { convertVolume(vol); - _mixer->playInputStream(type, handle, new LoopingAudioStream(this, sound, loopSound, loop), -1, vol); + _mixer->playStream(type, handle, new LoopingAudioStream(this, sound, loopSound, loop), -1, vol); } /////////////////////////////////////////////////////////////////////////////// @@ -297,7 +297,7 @@ Audio::AudioStream *RawSound::makeAudioStream(uint sound) { void RawSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, bool loop, int vol) { // Sound looping and volume are ignored. - _mixer->playInputStream(type, handle, makeAudioStream(sound)); + _mixer->playStream(type, handle, makeAudioStream(sound)); } /////////////////////////////////////////////////////////////////////////////// @@ -324,7 +324,7 @@ public: void playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, bool loop, int vol = 0) { convertVolume(vol); - _mixer->playInputStream(type, handle, new LoopingAudioStream(this, sound, loopSound, loop), -1, vol); + _mixer->playStream(type, handle, new LoopingAudioStream(this, sound, loopSound, loop), -1, vol); } }; @@ -738,7 +738,7 @@ void Sound::playRawData(byte *soundData, uint sound, uint size, uint freq) { flags = Audio::FLAG_UNSIGNED; Audio::AudioStream *stream = Audio::makeRawStream(buffer, size, freq, flags); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_effectsHandle, stream); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_effectsHandle, stream); } // Feeble Files specific @@ -783,7 +783,7 @@ void Sound::playSoundData(Audio::SoundHandle *handle, byte *soundData, uint soun convertVolume(vol); convertPan(pan); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, Audio::makeLoopingAudioStream(sndStream, loop ? 0 : 1), -1, vol, pan); + _mixer->playStream(Audio::Mixer::kSFXSoundType, handle, Audio::makeLoopingAudioStream(sndStream, loop ? 0 : 1), -1, vol, pan); } void Sound::stopSfx5() { diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp index 2fdc8297bf..dd4b4d4ab4 100644 --- a/engines/cine/sound.cpp +++ b/engines/cine/sound.cpp @@ -245,7 +245,7 @@ AdLibSoundDriver::AdLibSoundDriver(Audio::Mixer *mixer) memset(_channelsVolumeTable, 0, sizeof(_channelsVolumeTable)); memset(_instrumentsTable, 0, sizeof(_instrumentsTable)); initCard(); - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } AdLibSoundDriver::~AdLibSoundDriver() { @@ -802,7 +802,7 @@ void PaulaSound::playMusic() { debugC(5, kCineDebugSound, "PaulaSound::playMusic()"); _mixer->stopHandle(_moduleHandle); if (_moduleStream) { - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_moduleHandle, _moduleStream); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_moduleHandle, _moduleStream); } } @@ -846,7 +846,7 @@ void PaulaSound::playSoundChannel(int channel, int frequency, uint8 *data, int s assert(frequency > 0); frequency = PAULA_FREQ / frequency; Audio::AudioStream *stream = Audio::makeRawStream(data, size, frequency, 0); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_channelsTable[channel], stream); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_channelsTable[channel], stream); _mixer->setChannelVolume(_channelsTable[channel], volume * Audio::Mixer::kMaxChannelVolume / 63); } diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp index f97e373aa6..84547237cc 100644 --- a/engines/cruise/sound.cpp +++ b/engines/cruise/sound.cpp @@ -298,7 +298,7 @@ AdLibSoundDriver::AdLibSoundDriver(Audio::Mixer *mixer) } memset(_instrumentsTable, 0, sizeof(_instrumentsTable)); initCard(); - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); _musicVolume = ConfMan.getBool("music_mute") ? 0 : MIN(255, ConfMan.getInt("music_volume")); _sfxVolume = ConfMan.getBool("sfx_mute") ? 0 : MIN(255, ConfMan.getInt("sfx_volume")); diff --git a/engines/draci/sound.cpp b/engines/draci/sound.cpp index 12ac36b5c5..4fb2fd6309 100644 --- a/engines/draci/sound.cpp +++ b/engines/draci/sound.cpp @@ -204,7 +204,7 @@ void Sound::playSoundBuffer(Audio::SoundHandle *handle, const SoundSample &buffe Audio::AudioStream *stream = Audio::makeLoopingAudioStream( Audio::makeRawStream(buffer._data, buffer._length, buffer._frequency, flags, DisposeAfterUse::NO), loop ? 0 : 1); - _mixer->playInputStream(soundType, handle, stream, -1, volume); + _mixer->playStream(soundType, handle, stream, -1, volume); } void Sound::playSound(const SoundSample *buffer, int volume, bool loop) { diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp index 820f488b72..ad9ec6ca5e 100644 --- a/engines/drascula/sound.cpp +++ b/engines/drascula/sound.cpp @@ -188,7 +188,7 @@ void DrasculaEngine::playFile(const char *fname) { Audio::AudioStream *sound = Audio::makeRawStream(soundData, soundSize - 64, 11025, Audio::FLAG_UNSIGNED); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_soundHandle, sound); + _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_soundHandle, sound); } else warning("playFile: Could not open %s", fname); } diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp index 45e6e0e5fa..28123668cc 100644 --- a/engines/gob/sound/adlib.cpp +++ b/engines/gob/sound/adlib.cpp @@ -74,7 +74,7 @@ void AdLib::init() { _pollNotes[i] = 0; setFreqs(); - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_handle, + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_handle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } diff --git a/engines/gob/sound/infogrames.cpp b/engines/gob/sound/infogrames.cpp index 7c338a5544..6377b4e798 100644 --- a/engines/gob/sound/infogrames.cpp +++ b/engines/gob/sound/infogrames.cpp @@ -66,7 +66,7 @@ bool Infogrames::loadSong(const char *fileName) { void Infogrames::play() { if (_song && !_mixer->isSoundHandleActive(_handle)) { _song->restart(); - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_handle, _song, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); } } diff --git a/engines/gob/sound/pcspeaker.cpp b/engines/gob/sound/pcspeaker.cpp index 43b54c5aea..61402eb30e 100644 --- a/engines/gob/sound/pcspeaker.cpp +++ b/engines/gob/sound/pcspeaker.cpp @@ -30,7 +30,7 @@ namespace Gob { PCSpeaker::PCSpeaker(Audio::Mixer &mixer) : _mixer(&mixer) { _stream = new Audio::PCSpeaker(_mixer->getOutputRate()); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_handle, _stream, -1, 50, 0, DisposeAfterUse::NO, true); } diff --git a/engines/gob/sound/protracker.cpp b/engines/gob/sound/protracker.cpp index 9630610fa3..9c7de72c29 100644 --- a/engines/gob/sound/protracker.cpp +++ b/engines/gob/sound/protracker.cpp @@ -52,7 +52,7 @@ bool Protracker::play(const char *fileName) { if (!_protrackerStream) return false; - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_handle, + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_handle, _protrackerStream, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); return true; diff --git a/engines/gob/sound/soundmixer.cpp b/engines/gob/sound/soundmixer.cpp index ea94a095bb..1f5cf2e053 100644 --- a/engines/gob/sound/soundmixer.cpp +++ b/engines/gob/sound/soundmixer.cpp @@ -53,7 +53,7 @@ SoundMixer::SoundMixer(Audio::Mixer &mixer, Audio::Mixer::SoundType type) : _mix _fadeSamples = 0; _curFadeSamples = 0; - _mixer->playInputStream(type, &_handle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(type, &_handle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } SoundMixer::~SoundMixer() { diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index 0766f4f021..de91bb2067 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -519,7 +519,7 @@ bool ROQPlayer::processBlockSoundMono(ROQBlockHeader &blockHeader) { if (!_audioStream) { _audioStream = Audio::makeQueuingAudioStream(22050, false); Audio::SoundHandle sound_handle; - g_system->getMixer()->playInputStream(Audio::Mixer::kPlainSoundType, &sound_handle, _audioStream); + g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &sound_handle, _audioStream); } // Create the audio buffer @@ -562,7 +562,7 @@ bool ROQPlayer::processBlockSoundStereo(ROQBlockHeader &blockHeader) { if (!_audioStream) { _audioStream = Audio::makeQueuingAudioStream(22050, true); Audio::SoundHandle sound_handle; - g_system->getMixer()->playInputStream(Audio::Mixer::kPlainSoundType, &sound_handle, _audioStream); + g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &sound_handle, _audioStream); } // Create the audio buffer diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp index cb3bc59cb1..75c42ef174 100644 --- a/engines/groovie/vdx.cpp +++ b/engines/groovie/vdx.cpp @@ -501,7 +501,7 @@ void VDXPlayer::chunkSound(Common::ReadStream *in) { if (!_audioStream) { _audioStream = Audio::makeQueuingAudioStream(22050, false); Audio::SoundHandle sound_handle; - g_system->getMixer()->playInputStream(Audio::Mixer::kPlainSoundType, &sound_handle, _audioStream); + g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &sound_handle, _audioStream); } byte *data = (byte *)malloc(60000); diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index 3ef6645d55..a1d88a3005 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -118,7 +118,7 @@ bool Sound::playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *hand if (h >= kNumChannelHandles) return false; - _mixer->playInputStream(isSfx ? Audio::Mixer::kSFXSoundType : Audio::Mixer::kSpeechSoundType, &_soundChannels[h], stream, -1, volume); + _mixer->playStream(isSfx ? Audio::Mixer::kSFXSoundType : Audio::Mixer::kSpeechSoundType, &_soundChannels[h], stream, -1, volume); if (handle) *handle = _soundChannels[h]; diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp index 079588972f..75bb8fae55 100644 --- a/engines/kyra/sound_adlib.cpp +++ b/engines/kyra/sound_adlib.cpp @@ -451,7 +451,7 @@ AdLibDriver::AdLibDriver(Audio::Mixer *mixer, bool v2) { // is used by SFX or music, and then adjust the volume accordingly. Since Kyrandia 2 supports // different volumes for SFX and music, looking at the disasm and checking how the original does it // would be a good idea. - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); _samplesPerCallback = getRate() / CALLBACKS_PER_SECOND; _samplesPerCallbackRemainder = getRate() % CALLBACKS_PER_SECOND; diff --git a/engines/kyra/sound_amiga.cpp b/engines/kyra/sound_amiga.cpp index 751c5eba88..10125f639e 100644 --- a/engines/kyra/sound_amiga.cpp +++ b/engines/kyra/sound_amiga.cpp @@ -154,7 +154,7 @@ void SoundAmiga::playTrack(uint8 track) { _driver->setVolume(volume); _driver->setTempo(tempo << 4); if (!_mixer->isSoundHandleActive(_musicHandle)) - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_musicHandle, _driver, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_musicHandle, _driver, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); } } else if (track == 0) _driver->stopMusic(); @@ -215,7 +215,7 @@ void SoundAmiga::playSoundEffect(uint8 track) { if (_sfxEnabled && sfx) { const bool success = _driver->playNote(sfx->note, sfx->patch, sfx->duration, sfx->volume, pan); if (success && !_mixer->isSoundHandleActive(_musicHandle)) - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_musicHandle, _driver, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_musicHandle, _driver, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); } } diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp index f9684bed35..19d3d29411 100644 --- a/engines/kyra/sound_digital.cpp +++ b/engines/kyra/sound_digital.cpp @@ -482,7 +482,7 @@ int SoundDigital::playSound(const char *filename, uint8 priority, Audio::Mixer:: if (type == Audio::Mixer::kSpeechSoundType && _vm->heliumMode()) use->stream->setRate(32765); - _mixer->playInputStream(type, &use->handle, makeLoopingAudioStream(use->stream, loop ? 0 : 1), -1, volume); + _mixer->playStream(type, &use->handle, makeLoopingAudioStream(use->stream, loop ? 0 : 1), -1, volume); return use - _sounds; } diff --git a/engines/kyra/sound_pcspk.cpp b/engines/kyra/sound_pcspk.cpp index b694c8ceb8..0f3cce1c55 100644 --- a/engines/kyra/sound_pcspk.cpp +++ b/engines/kyra/sound_pcspk.cpp @@ -41,7 +41,7 @@ MidiDriver_PCSpeaker::MidiDriver_PCSpeaker(Audio::Mixer *mixer) _speaker = new Audio::PCSpeaker(_rate); assert(_speaker); - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); _countdown = 0xFFFF; _hardwareChannel[0] = 0xFF; diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index aab8373c61..31a7db478d 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -624,7 +624,7 @@ int Towns_EuphonyDriver::open() { return MERR_ALREADY_OPEN; MidiDriver_Emulated::open(); - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); return 0; @@ -2977,7 +2977,7 @@ bool TownsPC98_OpnCore::init() { _prc->init(_percussionData); } - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); _ready = true; @@ -3927,7 +3927,7 @@ void SoundTowns::playSoundEffect(uint8 track) { _currentSFX = Audio::makeRawStream(sfxPlaybackBuffer, playbackBufferSize, outputRate, Audio::FLAG_UNSIGNED | Audio::FLAG_LITTLE_ENDIAN); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, _currentSFX); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, _currentSFX); } void SoundTowns::beginFadeOut() { @@ -4299,7 +4299,7 @@ int32 SoundTownsPC98_v2::voicePlay(const char *file, Audio::SoundHandle *handle, _currentSFX = Audio::makeRawStream(sfx, outsize, outputRate, Audio::FLAG_UNSIGNED | Audio::FLAG_LITTLE_ENDIAN); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_soundChannels[h], _currentSFX); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundChannels[h], _currentSFX); if (handle) *handle = _soundChannels[h]; diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp index 354bfbb425..8a598591bb 100644 --- a/engines/kyra/vqa.cpp +++ b/engines/kyra/vqa.cpp @@ -649,7 +649,7 @@ void VQAMovie::play() { } } - _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sound, _stream); + _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_sound, _stream); Common::EventManager *eventMan = _vm->getEventManager(); for (uint i = 0; i < _header.numFrames; i++) { diff --git a/engines/m4/sound.cpp b/engines/m4/sound.cpp index 6c8c9edb82..69ab8c0516 100644 --- a/engines/m4/sound.cpp +++ b/engines/m4/sound.cpp @@ -96,7 +96,7 @@ void Sound::playSound(const char *soundName, int volume, bool loop, int channel) Audio::AudioStream *stream = Audio::makeLoopingAudioStream( Audio::makeRawStream(buffer, bufferSize, 11025, Audio::FLAG_UNSIGNED), loop ? 0 : 1); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &handle->handle, stream, -1, volume); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &handle->handle, stream, -1, volume); } void Sound::playSound(int soundNum) { @@ -151,7 +151,7 @@ void Sound::playVoice(const char *soundName, int volume) { // Voice format is 8bit mono, unsigned, 11025kHz Audio::AudioStream *stream = Audio::makeRawStream(buffer, soundStream->size(), 11025, Audio::FLAG_UNSIGNED); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &handle->handle, stream, -1, volume); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &handle->handle, stream, -1, volume); } void Sound::pauseVoice() { @@ -267,7 +267,7 @@ void Sound::playDSRSound(int soundIndex, int volume, bool loop) { _dsrFile.dsrEntries[soundIndex]->uncompSize, _dsrFile.dsrEntries[soundIndex]->frequency, Audio::FLAG_UNSIGNED), loop ? 0 : 1); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &handle->handle, stream, -1, volume); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &handle->handle, stream, -1, volume); /* // Dump the sound file diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index 20237501d9..a21d767998 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -175,7 +175,7 @@ bool PmvPlayer::play(const char *filename) { decompressMovieImage(imageData, *_surface, cmdOffs, pixelOffs, maskOffs, lineSize); if (firstTime) { - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, _audioStream); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, _audioStream); soundStartTime = g_system->getMillis(); skipFrames = 0; firstTime = false; diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index 349fc23468..cd4081ea52 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -239,7 +239,7 @@ int16 ScriptFunctions::sfPlaySound(int16 argc, int16 *argv) { } if (soundNum > 0) { SoundResource *soundRes = _vm->_res->getSound(soundNum); - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, + _vm->_mixer->playStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, soundRes->getAudioStream(_vm->_soundRate, false)); _vm->_soundEnergyArray = soundRes->getSoundEnergyArray(); _vm->_soundEnergyIndex = 0; @@ -586,7 +586,7 @@ int16 ScriptFunctions::sfPlayVoice(int16 argc, int16 *argv) { stopSound(); if (soundNum > 0) { _soundResource = _vm->_res->getSound(soundNum); - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, + _vm->_mixer->playStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, _soundResource->getAudioStream(_vm->_soundRate, false)); _vm->_autoStopSound = true; _soundStarted = true; diff --git a/engines/mohawk/sound.cpp b/engines/mohawk/sound.cpp index d6582f62a1..b84573f011 100644 --- a/engines/mohawk/sound.cpp +++ b/engines/mohawk/sound.cpp @@ -140,7 +140,7 @@ Audio::SoundHandle *Sound::playSound(uint16 id, bool mainSoundFile, byte volume, if (loop) audStream = Audio::makeLoopingAudioStream((Audio::RewindableAudioStream *)audStream, 0); - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &handle->handle, audStream, -1, volume); + _vm->_mixer->playStream(Audio::Mixer::kPlainSoundType, &handle->handle, audStream, -1, volume); return &handle->handle; } @@ -308,7 +308,7 @@ void Sound::playSLSTSound(uint16 id, bool fade, bool loop, uint16 volume, int16 // TODO: Handle fading, possibly just raise the volume of the channel in increments? - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, sndHandle.handle, audStream, -1, volume, convertBalance(balance)); + _vm->_mixer->playStream(Audio::Mixer::kPlainSoundType, sndHandle.handle, audStream, -1, volume, convertBalance(balance)); } void Sound::stopSLSTSound(uint16 index, bool fade) { diff --git a/engines/mohawk/video/qt_player.cpp b/engines/mohawk/video/qt_player.cpp index c7062124f6..803da4f5f1 100644 --- a/engines/mohawk/video/qt_player.cpp +++ b/engines/mohawk/video/qt_player.cpp @@ -191,7 +191,7 @@ void QTPlayer::startAudio() { if (!_audStream) // No audio/audio not supported return; - g_system->getMixer()->playInputStream(Audio::Mixer::kPlainSoundType, &_audHandle, _audStream); + g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audHandle, _audStream); } void QTPlayer::pauseAudio() { diff --git a/engines/parallaction/sound_br.cpp b/engines/parallaction/sound_br.cpp index ea66a7e299..1c724ddc1c 100644 --- a/engines/parallaction/sound_br.cpp +++ b/engines/parallaction/sound_br.cpp @@ -432,7 +432,7 @@ void DosSoundMan_br::playSfx(const char *filename, uint channel, bool looping, i Channel *ch = &_channels[channel]; Audio::AudioStream *input = loadChannelData(filename, ch, looping); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &ch->handle, input, -1, volume); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &ch->handle, input, -1, volume); } void DosSoundMan_br::playMusic() { @@ -509,7 +509,7 @@ void AmigaSoundMan_br::playSfx(const char *filename, uint channel, bool looping, volume = ch->volume; } - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &ch->handle, input, -1, volume); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &ch->handle, input, -1, volume); } void AmigaSoundMan_br::playMusic() { @@ -531,7 +531,7 @@ void AmigaSoundMan_br::playMusic() { debugC(3, kDebugAudio, "AmigaSoundMan_ns::playMusic(): created new music stream"); - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, _musicStream, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, _musicStream, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false); } void AmigaSoundMan_br::stopMusic() { diff --git a/engines/parallaction/sound_ns.cpp b/engines/parallaction/sound_ns.cpp index cd5fd274ed..3c1858b062 100644 --- a/engines/parallaction/sound_ns.cpp +++ b/engines/parallaction/sound_ns.cpp @@ -406,7 +406,7 @@ void AmigaSoundMan_ns::playSfx(const char *filename, uint channel, bool looping, volume = ch->volume; } - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &ch->handle, input, -1, volume); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &ch->handle, input, -1, volume); } void AmigaSoundMan_ns::stopSfx(uint channel) { @@ -431,7 +431,7 @@ void AmigaSoundMan_ns::playMusic() { debugC(3, kDebugAudio, "AmigaSoundMan_ns::playMusic(): created new music stream"); - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, _musicStream, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, _musicStream, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false); } void AmigaSoundMan_ns::stopMusic() { diff --git a/engines/queen/midiadlib.cpp b/engines/queen/midiadlib.cpp index aaee240e34..0498fc426a 100644 --- a/engines/queen/midiadlib.cpp +++ b/engines/queen/midiadlib.cpp @@ -132,7 +132,7 @@ int AdLibMidiDriver::open() { adlibSetNoteVolume(i, 0); adlibTurnNoteOff(i); } - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); return 0; } diff --git a/engines/queen/sound.cpp b/engines/queen/sound.cpp index cc85d459c9..659da2dd97 100644 --- a/engines/queen/sound.cpp +++ b/engines/queen/sound.cpp @@ -121,7 +121,7 @@ protected: void playSoundData(Common::File *f, uint32 size, Audio::SoundHandle *soundHandle) { Common::MemoryReadStream *tmp = f->readStream(size); assert(tmp); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, soundHandle, new AudioStreamWrapper(Audio::makeMP3Stream(tmp, DisposeAfterUse::YES))); + _mixer->playStream(Audio::Mixer::kSFXSoundType, soundHandle, new AudioStreamWrapper(Audio::makeMP3Stream(tmp, DisposeAfterUse::YES))); } }; #endif @@ -134,7 +134,7 @@ protected: void playSoundData(Common::File *f, uint32 size, Audio::SoundHandle *soundHandle) { Common::MemoryReadStream *tmp = f->readStream(size); assert(tmp); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, soundHandle, new AudioStreamWrapper(Audio::makeVorbisStream(tmp, DisposeAfterUse::YES))); + _mixer->playStream(Audio::Mixer::kSFXSoundType, soundHandle, new AudioStreamWrapper(Audio::makeVorbisStream(tmp, DisposeAfterUse::YES))); } }; #endif @@ -147,7 +147,7 @@ protected: void playSoundData(Common::File *f, uint32 size, Audio::SoundHandle *soundHandle) { Common::MemoryReadStream *tmp = f->readStream(size); assert(tmp); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, soundHandle, new AudioStreamWrapper(Audio::makeFLACStream(tmp, DisposeAfterUse::YES))); + _mixer->playStream(Audio::Mixer::kSFXSoundType, soundHandle, new AudioStreamWrapper(Audio::makeFLACStream(tmp, DisposeAfterUse::YES))); } }; #endif // #ifdef USE_FLAC @@ -331,7 +331,7 @@ void SBSound::playSoundData(Common::File *f, uint32 size, Audio::SoundHandle *so Audio::Mixer::SoundType type = (soundHandle == &_speechHandle) ? Audio::Mixer::kSpeechSoundType : Audio::Mixer::kSFXSoundType; Audio::AudioStream *stream = Audio::makeRawStream(sound, size, 11840, Audio::FLAG_UNSIGNED); - _mixer->playInputStream(type, soundHandle, stream); + _mixer->playStream(type, soundHandle, stream); } } @@ -615,7 +615,7 @@ void AmigaSound::playSound(const char *base) { f->read(soundData, soundSize); Audio::AudioStream *stream = Audio::makeRawStream(soundData, soundSize, 11025, 0); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, stream); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, stream); } } } @@ -648,7 +648,7 @@ void AmigaSound::playModule(const char *base, int song) { _mixer->stopHandle(_modHandle); Audio::AudioStream *stream = loadModule(base, song); if (stream) { - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_modHandle, stream); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_modHandle, stream); } _fanfareCount = 0; } @@ -657,7 +657,7 @@ void AmigaSound::playPattern(const char *base, int pattern) { _mixer->stopHandle(_patHandle); Audio::AudioStream *stream = loadModule(base, -pattern); if (stream) { - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_patHandle, stream); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_patHandle, stream); } } diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 55ced7fff5..23568853aa 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -280,7 +280,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) { for (int i = 0; i < 2; ++i) { stream = Audio::SeekableAudioStream::openStreamFile(trackName[i]); if (stream) { - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, Audio::makeLoopingAudioStream(stream, (flags == MUSIC_LOOP) ? 0 : 1)); _digitalMusic = true; return; @@ -343,13 +343,13 @@ void Music::play(uint32 resourceId, MusicFlags flags) { if (audioStream) { debug(2, "Playing digitized music"); if (loopStart) { - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, new Audio::SubLoopingAudioStream(audioStream, (flags == MUSIC_LOOP ? 0 : 1), Audio::Timestamp(0, loopStart, audioStream->getRate()), audioStream->getLength())); } else { - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, Audio::makeLoopingAudioStream(audioStream, (flags == MUSIC_LOOP ? 0 : 1))); } _digitalMusic = true; diff --git a/engines/saga/sound.cpp b/engines/saga/sound.cpp index c369ec169f..811ee709f7 100644 --- a/engines/saga/sound.cpp +++ b/engines/saga/sound.cpp @@ -102,7 +102,7 @@ void Sound::playSoundBuffer(Audio::SoundHandle *handle, const SoundBuffer &buffe } if (stream != NULL) - _mixer->playInputStream(soundType, handle, Audio::makeLoopingAudioStream(stream, loop ? 0 : 1), -1, volume); + _mixer->playStream(soundType, handle, Audio::makeLoopingAudioStream(stream, loop ? 0 : 1), -1, volume); } void Sound::playSound(SoundBuffer &buffer, int volume, bool loop) { diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp index 9502b279ae..935427c51a 100644 --- a/engines/sci/sound/audio.cpp +++ b/engines/sci/sound/audio.cpp @@ -61,7 +61,7 @@ int AudioPlayer::startAudio(uint16 module, uint32 number) { Audio::AudioStream *audioStream = getAudioStream(number, module, &sampleLen); if (audioStream) { - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_audioHandle, audioStream); + _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_audioHandle, audioStream); return sampleLen; } diff --git a/engines/sci/sound/drivers/adlib.cpp b/engines/sci/sound/drivers/adlib.cpp index a8733dc0a2..a743e4b5d9 100644 --- a/engines/sci/sound/drivers/adlib.cpp +++ b/engines/sci/sound/drivers/adlib.cpp @@ -238,7 +238,7 @@ int MidiDriver_AdLib::open(bool isSCI0) { MidiDriver_Emulated::open(); - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, _mixer->kMaxChannelVolume, 0, DisposeAfterUse::NO); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, _mixer->kMaxChannelVolume, 0, DisposeAfterUse::NO); return 0; } diff --git a/engines/sci/sound/drivers/amiga.cpp b/engines/sci/sound/drivers/amiga.cpp index b9fb17b84d..0413dbb79e 100644 --- a/engines/sci/sound/drivers/amiga.cpp +++ b/engines/sci/sound/drivers/amiga.cpp @@ -541,7 +541,7 @@ int MidiDriver_Amiga::open() { MidiDriver_Emulated::open(); - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, _mixer->kMaxChannelVolume, 0, DisposeAfterUse::NO); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, _mixer->kMaxChannelVolume, 0, DisposeAfterUse::NO); return Common::kNoError; } diff --git a/engines/sci/sound/drivers/pcjr.cpp b/engines/sci/sound/drivers/pcjr.cpp index 420007b698..e2544869ac 100644 --- a/engines/sci/sound/drivers/pcjr.cpp +++ b/engines/sci/sound/drivers/pcjr.cpp @@ -221,7 +221,7 @@ int MidiDriver_PCJr::open(int channels) { MidiDriver_Emulated::open(); - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, _mixer->kMaxChannelVolume, 0, DisposeAfterUse::NO); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, _mixer->kMaxChannelVolume, 0, DisposeAfterUse::NO); return 0; } diff --git a/engines/sci/sound/iterator/core.cpp b/engines/sci/sound/iterator/core.cpp index 7e5b690c08..7cd730b3e2 100644 --- a/engines/sci/sound/iterator/core.cpp +++ b/engines/sci/sound/iterator/core.cpp @@ -639,7 +639,7 @@ static int sfx_play_iterator_pcm(SongIterator *it, SongHandle handle) { if (g_system->getMixer()->isReady()) { Audio::AudioStream *newfeed = it->getAudioStream(); if (newfeed) { - g_system->getMixer()->playInputStream(Audio::Mixer::kSFXSoundType, 0, newfeed); + g_system->getMixer()->playStream(Audio::Mixer::kSFXSoundType, 0, newfeed); return 1; } } diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 7915395e9a..f8b02f5a58 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -256,11 +256,11 @@ void SciMusic::soundPlay(MusicEntry *pSnd) { if (pSnd->loop > 1) { pSnd->pLoopStream = new Audio::LoopingAudioStream(pSnd->pStreamAud, pSnd->loop, DisposeAfterUse::NO); - _pMixer->playInputStream(pSnd->soundType, &pSnd->hCurrentAud, + _pMixer->playStream(pSnd->soundType, &pSnd->hCurrentAud, pSnd->pLoopStream, -1, pSnd->volume, 0, DisposeAfterUse::NO); } else { - _pMixer->playInputStream(pSnd->soundType, &pSnd->hCurrentAud, + _pMixer->playStream(pSnd->soundType, &pSnd->hCurrentAud, pSnd->pStreamAud, -1, pSnd->volume, 0, DisposeAfterUse::NO); } diff --git a/engines/scumm/he/cup_player_he.cpp b/engines/scumm/he/cup_player_he.cpp index 17483b6bd9..87afe5fd90 100644 --- a/engines/scumm/he/cup_player_he.cpp +++ b/engines/scumm/he/cup_player_he.cpp @@ -169,7 +169,7 @@ void CUP_Player::updateSfx() { uint8 *soundData = _sfxBuffer + offset; if (READ_BE_UINT32(soundData) == MKID_BE('DATA')) { uint32 soundSize = READ_BE_UINT32(soundData + 4); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &sfxChannel->handle, + _mixer->playStream(Audio::Mixer::kSFXSoundType, &sfxChannel->handle, Audio::makeLoopingAudioStream( Audio::makeRawStream(soundData + 8, soundSize - 8, 11025, Audio::FLAG_UNSIGNED, DisposeAfterUse::NO), diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index 97c192cec5..7bfd1de4cf 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -575,7 +575,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) if (_vm->_game.heversion == 70) { stream = Audio::makeRawStream(spoolPtr, size, 11025, flags, DisposeAfterUse::NO); - _mixer->playInputStream(type, &_heSoundChannels[heChannel], stream, soundID); + _mixer->playStream(type, &_heSoundChannels[heChannel], stream, soundID); return; } } @@ -671,7 +671,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) } else { stream = Audio::makeRawStream(ptr + memStream.pos() + heOffset, size - heOffset, rate, flags, DisposeAfterUse::NO); } - _mixer->playInputStream(type, &_heSoundChannels[heChannel], + _mixer->playStream(type, &_heSoundChannels[heChannel], Audio::makeLoopingAudioStream(stream, (heFlags & 1) ? 0 : 1), soundID); } // Support for sound in Humongous Entertainment games @@ -730,7 +730,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) _mixer->stopHandle(_heSoundChannels[heChannel]); stream = Audio::makeRawStream(ptr + heOffset + 8, size, rate, flags, DisposeAfterUse::NO); - _mixer->playInputStream(type, &_heSoundChannels[heChannel], + _mixer->playStream(type, &_heSoundChannels[heChannel], Audio::makeLoopingAudioStream(stream, (heFlags & 1) ? 0 : 1), soundID); } // Support for PCM music in 3DO versions of Humongous Entertainment games @@ -751,7 +751,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) _currentMusic = soundID; stream = Audio::makeRawStream(sound, size, rate, 0); - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, NULL, stream, soundID); + _mixer->playStream(Audio::Mixer::kMusicSoundType, NULL, stream, soundID); } else if (READ_BE_UINT32(ptr) == MKID_BE('MIDI')) { if (_vm->_imuse) { diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp index e84ae41d14..ceca557f06 100644 --- a/engines/scumm/imuse_digi/dimuse.cpp +++ b/engines/scumm/imuse_digi/dimuse.cpp @@ -202,7 +202,7 @@ void IMuseDigital::saveOrLoad(Serializer *ser) { track->stream = Audio::makeQueuingAudioStream(freq, (track->mixerFlags & kFlagStereo) != 0); - _mixer->playInputStream(track->getType(), &track->mixChanHandle, track->stream, -1, track->getVol(), track->getPan(), + _mixer->playStream(track->getType(), &track->mixChanHandle, track->stream, -1, track->getVol(), track->getPan(), DisposeAfterUse::YES, false, (track->mixerFlags & kFlagStereo) != 0); _mixer->pauseHandle(track->mixChanHandle, true); } diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp index e56864548e..c56ca40cd0 100644 --- a/engines/scumm/imuse_digi/dimuse_track.cpp +++ b/engines/scumm/imuse_digi/dimuse_track.cpp @@ -112,7 +112,7 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, track->souStreamUsed = (input != 0); if (track->souStreamUsed) { - _mixer->playInputStream(track->getType(), &track->mixChanHandle, input, -1, track->getVol(), track->getPan(), + _mixer->playStream(track->getType(), &track->mixChanHandle, input, -1, track->getVol(), track->getPan(), DisposeAfterUse::YES, false, (track->mixerFlags & kFlagStereo) != 0); } else { strcpy(track->soundName, soundName); @@ -169,7 +169,7 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, } track->stream = Audio::makeQueuingAudioStream(freq, track->mixerFlags & kFlagStereo); - _mixer->playInputStream(track->getType(), &track->mixChanHandle, track->stream, -1, track->getVol(), track->getPan(), + _mixer->playStream(track->getType(), &track->mixChanHandle, track->stream, -1, track->getVol(), track->getPan(), DisposeAfterUse::YES, false, (track->mixerFlags & kFlagStereo) != 0); } @@ -370,7 +370,7 @@ Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDelay) { // Create an appendable output buffer fadeTrack->stream = Audio::makeQueuingAudioStream(_sound->getFreq(fadeTrack->soundDesc), track->mixerFlags & kFlagStereo); - _mixer->playInputStream(track->getType(), &fadeTrack->mixChanHandle, fadeTrack->stream, -1, fadeTrack->getVol(), fadeTrack->getPan(), + _mixer->playStream(track->getType(), &fadeTrack->mixChanHandle, fadeTrack->stream, -1, fadeTrack->getVol(), fadeTrack->getPan(), DisposeAfterUse::YES, false, (track->mixerFlags & kFlagStereo) != 0); fadeTrack->used = true; diff --git a/engines/scumm/player_mod.cpp b/engines/scumm/player_mod.cpp index 02be600270..930c85dadf 100644 --- a/engines/scumm/player_mod.cpp +++ b/engines/scumm/player_mod.cpp @@ -49,7 +49,7 @@ Player_MOD::Player_MOD(Audio::Mixer *mixer) _playproc = NULL; _playparam = NULL; - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } Player_MOD::~Player_MOD() { diff --git a/engines/scumm/player_nes.cpp b/engines/scumm/player_nes.cpp index d413fc718b..4618de3175 100644 --- a/engines/scumm/player_nes.cpp +++ b/engines/scumm/player_nes.cpp @@ -621,7 +621,7 @@ Player_NES::Player_NES(ScummEngine *scumm, Audio::Mixer *mixer) { APU_writeControl(0); - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } Player_NES::~Player_NES() { diff --git a/engines/scumm/player_pce.cpp b/engines/scumm/player_pce.cpp index 3e81e7c276..4beaf52e8b 100644 --- a/engines/scumm/player_pce.cpp +++ b/engines/scumm/player_pce.cpp @@ -726,7 +726,7 @@ Player_PCE::Player_PCE(ScummEngine *scumm, Audio::Mixer *mixer) { _psg = new PSG_HuC6280(PSG_CLOCK, _sampleRate); - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } Player_PCE::~Player_PCE() { diff --git a/engines/scumm/player_sid.cpp b/engines/scumm/player_sid.cpp index eed38cd219..3f7b65cbb4 100644 --- a/engines/scumm/player_sid.cpp +++ b/engines/scumm/player_sid.cpp @@ -1263,7 +1263,7 @@ Player_SID::Player_SID(ScummEngine *scumm, Audio::Mixer *mixer) { initSID(); resetSID(); - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } Player_SID::~Player_SID() { diff --git a/engines/scumm/player_v2.cpp b/engines/scumm/player_v2.cpp index b307fe45ab..c1c9b3930e 100644 --- a/engines/scumm/player_v2.cpp +++ b/engines/scumm/player_v2.cpp @@ -366,7 +366,7 @@ Player_V2::Player_V2(ScummEngine *scumm, Audio::Mixer *mixer, bool pcjr) { set_pcjr(pcjr); setMusicVolume(255); - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } Player_V2::~Player_V2() { diff --git a/engines/scumm/player_v2cms.cpp b/engines/scumm/player_v2cms.cpp index 51552137d1..e3e7bc1901 100644 --- a/engines/scumm/player_v2cms.cpp +++ b/engines/scumm/player_v2cms.cpp @@ -891,7 +891,7 @@ Player_V2CMS::Player_V2CMS(ScummEngine *scumm, Audio::Mixer *mixer) { } } - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } Player_V2CMS::~Player_V2CMS() { diff --git a/engines/scumm/player_v4a.cpp b/engines/scumm/player_v4a.cpp index 28489f86ce..53c9e6b93c 100644 --- a/engines/scumm/player_v4a.cpp +++ b/engines/scumm/player_v4a.cpp @@ -154,7 +154,7 @@ void Player_V4A::startSound(int nr) { // the Tfmx-player never "ends" the output by itself, so this should be threadsafe if (!_mixer->isSoundHandleActive(_sfxHandle)) - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, &_tfmxSfx, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, &_tfmxSfx, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); } else { // Song debug(3, "player_v4a: play %d: song %i - %02X", nr, index, type); @@ -166,7 +166,7 @@ void Player_V4A::startSound(int nr) { // the Tfmx-player never "ends" the output by itself, so this should be threadsafe if (!_mixer->isSoundHandleActive(_musicHandle)) - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, &_tfmxMusic, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, &_tfmxMusic, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); _musicId = nr; } } diff --git a/engines/scumm/smush/smush_mixer.cpp b/engines/scumm/smush/smush_mixer.cpp index b40a76ac11..eca1ebdcab 100644 --- a/engines/scumm/smush/smush_mixer.cpp +++ b/engines/scumm/smush/smush_mixer.cpp @@ -124,7 +124,7 @@ bool SmushMixer::handleFrame() { // Stream the data if (!_channels[i].stream) { _channels[i].stream = Audio::makeQueuingAudioStream(_channels[i].chan->getRate(), stereo); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_channels[i].handle, _channels[i].stream); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_channels[i].handle, _channels[i].stream); } _mixer->setChannelVolume(_channels[i].handle, vol); _mixer->setChannelBalance(_channels[i].handle, pan); diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp index 251b031737..dcb47f47b8 100644 --- a/engines/scumm/smush/smush_player.cpp +++ b/engines/scumm/smush/smush_player.cpp @@ -471,7 +471,7 @@ void SmushPlayer::handleIACT(int32 subSize, Common::SeekableReadStream &b) { if (!_IACTstream) { _IACTstream = Audio::makeQueuingAudioStream(22050, true); - _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_IACTchannel, _IACTstream); + _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_IACTchannel, _IACTstream); } _IACTstream->queueBuffer(output_data, 0x1000, DisposeAfterUse::YES, Audio::FLAG_STEREO | Audio::FLAG_16BITS); @@ -1111,7 +1111,7 @@ void SmushPlayer::tryCmpFile(const char *filename) { strcpy(fname + (i - filename), ".ogg"); if (file->open(fname)) { _compressedFileMode = true; - _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_compressedFileSoundHandle, Audio::makeVorbisStream(file, DisposeAfterUse::YES)); + _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_compressedFileSoundHandle, Audio::makeVorbisStream(file, DisposeAfterUse::YES)); return; } #endif @@ -1120,7 +1120,7 @@ void SmushPlayer::tryCmpFile(const char *filename) { strcpy(fname + (i - filename), ".mp3"); if (file->open(fname)) { _compressedFileMode = true; - _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_compressedFileSoundHandle, Audio::makeMP3Stream(file, DisposeAfterUse::YES)); + _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_compressedFileSoundHandle, Audio::makeMP3Stream(file, DisposeAfterUse::YES)); return; } #endif diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index 132d19ba6b..85e8636e48 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -204,7 +204,7 @@ void Sound::playSound(int soundID) { memcpy(sound, ptr, size); stream = Audio::makeRawStream(sound, size, rate, Audio::FLAG_UNSIGNED); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID); + _mixer->playStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID); } // WORKAROUND bug # 1311447 else if (READ_BE_UINT32(ptr) == 0x460e200d) { @@ -227,7 +227,7 @@ void Sound::playSound(int soundID) { sound = (byte *)malloc(size); memcpy(sound, ptr, size); stream = Audio::makeRawStream(sound, size, rate, Audio::FLAG_UNSIGNED); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID); + _mixer->playStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID); } // Support for sampled sound effects in Monkey Island 1 and 2 else if (READ_BE_UINT32(ptr) == MKID_BE('SBL ')) { @@ -299,7 +299,7 @@ void Sound::playSound(int soundID) { sound = (byte *)malloc(size); memcpy(sound, ptr + 6, size); stream = Audio::makeRawStream(sound, size, rate, Audio::FLAG_UNSIGNED); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID); + _mixer->playStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID); } else if ((_vm->_game.platform == Common::kPlatformFMTowns && _vm->_game.version == 3) || READ_BE_UINT32(ptr) == MKID_BE('SOUN') || READ_BE_UINT32(ptr) == MKID_BE('TOWS')) { @@ -355,7 +355,7 @@ void Sound::playSound(int soundID) { } else { stream = Audio::makeRawStream(sound, waveSize, rate, Audio::FLAG_UNSIGNED); } - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID, 255, 0); + _mixer->playStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID, 255, 0); } break; case 1: @@ -450,7 +450,7 @@ void Sound::playSound(int soundID) { stream = plainStream; } - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID, vol, 0); + _mixer->playStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID, vol, 0); } else { @@ -677,7 +677,7 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle _vm->_imuseDigital->startVoice(kTalkSoundID, input); #endif } else { - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, handle, input, id); + _mixer->playStream(Audio::Mixer::kSpeechSoundType, handle, input, id); } } } diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp index 5114162a61..68e84d616d 100644 --- a/engines/sky/intro.cpp +++ b/engines/sky/intro.cpp @@ -735,12 +735,12 @@ bool Intro::nextPart(uint16 *&data) { return false; vData = _skyDisk->loadFile(*data++); // HACK: Fill the header with silence. We should - // probably use _skySound instead of calling playInputStream() + // probably use _skySound instead of calling playStream() // directly, but this will have to do for now. memset(vData, 127, sizeof(DataFileHeader)); stream = Audio::makeRawStream(vData, _skyDisk->_lastLoadedFileSize, 11025, Audio::FLAG_UNSIGNED); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_voice, stream, SOUND_VOICE); + _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_voice, stream, SOUND_VOICE); return true; case WAITVOICE: while (_mixer->isSoundHandleActive(_voice)) @@ -756,12 +756,12 @@ bool Intro::nextPart(uint16 *&data) { case LOOPBG: _mixer->stopID(SOUND_BG); stream = Audio::makeRawStream(_bgBuf + 256, _bgSize - 768, 11025, Audio::FLAG_UNSIGNED, DisposeAfterUse::NO); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_bgSfx, Audio::makeLoopingAudioStream(stream, 0), SOUND_BG); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_bgSfx, Audio::makeLoopingAudioStream(stream, 0), SOUND_BG); return true; case PLAYBG: _mixer->stopID(SOUND_BG); stream = Audio::makeRawStream(_bgBuf + 256, _bgSize - 768, 11025, Audio::FLAG_UNSIGNED, DisposeAfterUse::NO); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_bgSfx, stream, SOUND_BG); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_bgSfx, stream, SOUND_BG); return true; case STOPBG: _mixer->stopID(SOUND_BG); diff --git a/engines/sky/music/adlibmusic.cpp b/engines/sky/music/adlibmusic.cpp index f8b3cb480c..0b593f555b 100644 --- a/engines/sky/music/adlibmusic.cpp +++ b/engines/sky/music/adlibmusic.cpp @@ -40,7 +40,7 @@ AdLibMusic::AdLibMusic(Audio::Mixer *pMixer, Disk *pDisk) : MusicBase(pDisk) { _opl = makeAdLibOPL(_sampleRate); - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } AdLibMusic::~AdLibMusic() { diff --git a/engines/sky/sound.cpp b/engines/sky/sound.cpp index 179bb5e37a..dc76cb8f0d 100644 --- a/engines/sky/sound.cpp +++ b/engines/sky/sound.cpp @@ -1046,7 +1046,7 @@ void Sound::playSound(uint32 id, byte *sound, uint32 size, Audio::SoundHandle *h _mixer->stopID(id); Audio::AudioStream *stream = Audio::makeRawStream(buffer, size, 11025, flags); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, stream, id); + _mixer->playStream(Audio::Mixer::kSFXSoundType, handle, stream, id); } void Sound::loadSection(uint8 pSection) { @@ -1126,9 +1126,9 @@ void Sound::playSound(uint16 sound, uint16 volume, uint8 channel) { } if (channel == 0) - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_ingameSound0, output, SOUND_CH0, volume, 0); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_ingameSound0, output, SOUND_CH0, volume, 0); else - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_ingameSound1, output, SOUND_CH1, volume, 0); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_ingameSound1, output, SOUND_CH1, volume, 0); } void Sound::fnStartFx(uint32 sound, uint8 channel) { @@ -1252,7 +1252,7 @@ bool Sound::startSpeech(uint16 textNum) { _mixer->stopID(SOUND_SPEECH); Audio::AudioStream *stream = Audio::makeRawStream(playBuffer, speechSize, rate, Audio::FLAG_UNSIGNED); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_ingameSpeech, stream, SOUND_SPEECH); + _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_ingameSpeech, stream, SOUND_SPEECH); return true; } diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index 2c2c92bb8d..1c1f6dcf4e 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -147,7 +147,7 @@ bool MoviePlayer::load(uint32 id) { void MoviePlayer::play() { if (_bgSoundStream) { - _snd->playInputStream(Audio::Mixer::kSFXSoundType, _bgSoundHandle, _bgSoundStream); + _snd->playStream(Audio::Mixer::kSFXSoundType, _bgSoundHandle, _bgSoundStream); } bool terminated = false; diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp index 8a60681ebe..91c943472c 100644 --- a/engines/sword1/music.cpp +++ b/engines/sword1/music.cpp @@ -238,7 +238,7 @@ Music::Music(Audio::Mixer *pMixer) { _converter[0] = NULL; _converter[1] = NULL; _volumeL = _volumeR = 192; - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } Music::~Music() { diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp index 1c34d5380c..da9a83cdff 100644 --- a/engines/sword1/sound.cpp +++ b/engines/sword1/sound.cpp @@ -261,7 +261,7 @@ void Sound::playSample(QueueElement *elem) { if (SwordEngine::isPsx()) { uint32 size = READ_LE_UINT32(sampleData); Audio::AudioStream *audStream = Audio::makeLoopingAudioStream(Audio::makeVagStream(new Common::MemoryReadStream(sampleData + 4, size-4)), (_fxList[elem->id].type == FX_LOOP) ? 0 : 1); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &elem->handle, audStream, elem->id, volume, pan); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &elem->handle, audStream, elem->id, volume, pan); } else { uint32 size = READ_LE_UINT32(sampleData + 0x28); uint8 flags; @@ -274,7 +274,7 @@ void Sound::playSample(QueueElement *elem) { Audio::AudioStream *stream = Audio::makeLoopingAudioStream( Audio::makeRawStream(sampleData + 0x2C, size, 11025, flags, DisposeAfterUse::NO), (_fxList[elem->id].type == FX_LOOP) ? 0 : 1); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &elem->handle, stream, elem->id, volume, pan); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &elem->handle, stream, elem->id, volume, pan); } } } else @@ -362,14 +362,14 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) { int16 *data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size); if (data) { stream = Audio::makeRawStream((byte *)data, size, 11025, SPEECH_FLAGS); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream, SOUND_SPEECH_ID, speechVol, speechPan); + _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream, SOUND_SPEECH_ID, speechVol, speechPan); } } else if (_cowMode == CowPSX && sampleSize != 0xffffffff) { _cowFile.seek(index * 2048); Common::MemoryReadStream *tmp = _cowFile.readStream(sampleSize); assert(tmp); stream = Audio::makeVagStream(tmp); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream, SOUND_SPEECH_ID, speechVol, speechPan); + _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream, SOUND_SPEECH_ID, speechVol, speechPan); // with compressed audio, we can't calculate the wave volume. // so default to talking. for (int cnt = 0; cnt < 480; cnt++) @@ -382,7 +382,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) { Common::MemoryReadStream *tmp = _cowFile.readStream(sampleSize); assert(tmp); stream = Audio::makeFLACStream(tmp, DisposeAfterUse::YES); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream, SOUND_SPEECH_ID, speechVol, speechPan); + _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream, SOUND_SPEECH_ID, speechVol, speechPan); // with compressed audio, we can't calculate the wave volume. // so default to talking. for (int cnt = 0; cnt < 480; cnt++) @@ -396,7 +396,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) { Common::MemoryReadStream *tmp = _cowFile.readStream(sampleSize); assert(tmp); stream = Audio::makeVorbisStream(tmp, DisposeAfterUse::YES); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream, SOUND_SPEECH_ID, speechVol, speechPan); + _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream, SOUND_SPEECH_ID, speechVol, speechPan); // with compressed audio, we can't calculate the wave volume. // so default to talking. for (int cnt = 0; cnt < 480; cnt++) @@ -410,7 +410,7 @@ bool Sound::startSpeech(uint16 roomNo, uint16 localNo) { Common::MemoryReadStream *tmp = _cowFile.readStream(sampleSize); assert(tmp); stream = Audio::makeMP3Stream(tmp, DisposeAfterUse::YES); - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream, SOUND_SPEECH_ID, speechVol, speechPan); + _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream, SOUND_SPEECH_ID, speechVol, speechPan); // with compressed audio, we can't calculate the wave volume. // so default to talking. for (int cnt = 0; cnt < 480; cnt++) diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index 3429ab8683..55c5e800e8 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -102,7 +102,7 @@ void MoviePlayer::play(MovieText *movieTexts, uint32 numMovieTexts, uint32 leadI } if (_bgSoundStream) { - _snd->playInputStream(Audio::Mixer::kSFXSoundType, _bgSoundHandle, _bgSoundStream); + _snd->playStream(Audio::Mixer::kSFXSoundType, _bgSoundHandle, _bgSoundStream); } bool terminated = false; diff --git a/engines/sword2/music.cpp b/engines/sword2/music.cpp index 09c2117443..72971e2876 100644 --- a/engines/sword2/music.cpp +++ b/engines/sword2/music.cpp @@ -799,7 +799,7 @@ int32 Sound::playCompSpeech(uint32 speechId, uint8 vol, int8 pan) { p = -p; // Start the speech playing - _vm->_mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_soundHandleSpeech, input, -1, volume, p); + _vm->_mixer->playStream(Audio::Mixer::kSpeechSoundType, &_soundHandleSpeech, input, -1, volume, p); return RD_OK; } diff --git a/engines/sword2/sound.cpp b/engines/sword2/sound.cpp index 25069e83cd..5e67ce9adf 100644 --- a/engines/sword2/sound.cpp +++ b/engines/sword2/sound.cpp @@ -93,7 +93,7 @@ Sound::Sound(Sword2Engine *vm) { _mixBuffer = NULL; _mixBufferLen = 0; - _vm->_mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _vm->_mixer->playStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } Sound::~Sound() { @@ -343,7 +343,7 @@ int32 Sound::playFx(Audio::SoundHandle *handle, byte *data, uint32 len, uint8 vo assert(input); - _vm->_mixer->playInputStream(soundType, handle, + _vm->_mixer->playStream(soundType, handle, Audio::makeLoopingAudioStream(input, loop ? 0 : 1), -1, vol, pan, DisposeAfterUse::YES, false, isReverseStereo()); diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp index b23dd8f500..d3e5fcecae 100644 --- a/engines/teenagent/teenagent.cpp +++ b/engines/teenagent/teenagent.cpp @@ -433,7 +433,7 @@ Common::Error TeenAgentEngine::run() { syncSoundSettings(); music->load(1); - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, music, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, music, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false); music->start(); int load_slot = Common::ConfigManager::instance().getInt("save_slot"); @@ -925,7 +925,7 @@ void TeenAgentEngine::playSoundNow(byte id) { //debug(0, "playing %u samples...", size); Audio::AudioStream *stream = Audio::makeRawStream(data, size, 11025, 0); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_soundHandle, stream); //dispose is YES by default + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, stream); //dispose is YES by default } diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp index 7f3386edfa..f6e44cea1c 100644 --- a/engines/tinsel/bmv.cpp +++ b/engines/tinsel/bmv.cpp @@ -459,7 +459,7 @@ void BMVPlayer::MovieAudio(int audioOffset, int blobs) { if (currentSoundFrame == ADVANCE_SOUND) { if (!audioStarted) { - _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, + _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_audioHandle, _audioStream, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); audioStarted = true; } diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index 7763058963..f282d133a0 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -570,7 +570,7 @@ PCMMusicPlayer::PCMMusicPlayer() { _end = true; - _vm->_mixer->playInputStream(Audio::Mixer::kMusicSoundType, + _vm->_mixer->playStream(Audio::Mixer::kMusicSoundType, &_handle, this, -1, _volume, 0, DisposeAfterUse::NO, true); } diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp index 370b2e0a82..bb0e251b52 100644 --- a/engines/tinsel/sound.cpp +++ b/engines/tinsel/sound.cpp @@ -117,7 +117,7 @@ bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::Sound _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, _vm->_config->_voiceVolume); // Play the audio stream - _vm->_mixer->playInputStream(type, &curChan.handle, vagStream); + _vm->_mixer->playStream(type, &curChan.handle, vagStream); } else { // allocate a buffer byte *sampleBuf = (byte *)malloc(sampleLen); @@ -158,7 +158,7 @@ bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::Sound break; } if (sampleStream) { - _vm->_mixer->playInputStream(type, &curChan.handle, sampleStream); + _vm->_mixer->playStream(type, &curChan.handle, sampleStream); } } @@ -324,7 +324,7 @@ bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int p //curChan->timeDuration = (((sampleLen * 64) / 25) * 1000) / (22050 * 2); // Play it - _vm->_mixer->playInputStream(type, &curChan->handle, sampleStream); + _vm->_mixer->playStream(type, &curChan->handle, sampleStream); _vm->_mixer->setChannelVolume(curChan->handle, sndVol); _vm->_mixer->setChannelBalance(curChan->handle, getPan(x)); diff --git a/engines/touche/resource.cpp b/engines/touche/resource.cpp index 6e0b0220b7..8a810f09d8 100644 --- a/engines/touche/resource.cpp +++ b/engines/touche/resource.cpp @@ -590,7 +590,7 @@ void ToucheEngine::res_loadSound(int priority, int num) { _fData.seek(offs); Audio::AudioStream *stream = Audio::makeVOCStream(&_fData, Audio::FLAG_UNSIGNED); if (stream) { - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, stream); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, stream); } } } @@ -672,7 +672,7 @@ void ToucheEngine::res_loadSpeechSegment(int num) { } if (stream) { _speechPlaying = true; - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream); + _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream); } } } diff --git a/engines/tucker/resource.cpp b/engines/tucker/resource.cpp index c82a46ee9c..025721e5fc 100644 --- a/engines/tucker/resource.cpp +++ b/engines/tucker/resource.cpp @@ -954,7 +954,7 @@ void TuckerEngine::loadSound(Audio::Mixer::SoundType type, int num, int volume, if (stream) { _mixer->stopHandle(*handle); - _mixer->playInputStream(type, handle, Audio::makeLoopingAudioStream(stream, loop ? 0 : 1), + _mixer->playStream(type, handle, Audio::makeLoopingAudioStream(stream, loop ? 0 : 1), -1, scaleMixerVolume(volume, kMaxSoundVolume)); } } diff --git a/engines/tucker/sequences.cpp b/engines/tucker/sequences.cpp index f08cf4becc..9689ad75d2 100644 --- a/engines/tucker/sequences.cpp +++ b/engines/tucker/sequences.cpp @@ -616,7 +616,7 @@ void AnimationSequencePlayer::loadSounds(int num) { if (_soundSeqDataList[num].musicVolume != 0) { Audio::AudioStream *s; if ((s = loadSound(_soundSeqDataList[num].musicIndex, kAnimationSoundType8BitsRAW)) != 0) { - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, s, -1, scaleMixerVolume(_soundSeqDataList[num].musicVolume)); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, s, -1, scaleMixerVolume(_soundSeqDataList[num].musicVolume)); } } _soundSeqDataIndex = 0; @@ -631,12 +631,12 @@ void AnimationSequencePlayer::updateSounds() { switch (p->opcode) { case 0: if ((s = loadSound(p->num, kAnimationSoundTypeWAV)) != 0) { - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_soundsHandle[p->index], s, -1, scaleMixerVolume(p->volume)); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundsHandle[p->index], s, -1, scaleMixerVolume(p->volume)); } break; case 1: if ((s = loadSound(p->num, kAnimationSoundTypeWAV)) != 0) { - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_soundsHandle[p->index], Audio::makeLoopingAudioStream(s, 0), + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundsHandle[p->index], Audio::makeLoopingAudioStream(s, 0), -1, scaleMixerVolume(p->volume)); } break; @@ -649,18 +649,18 @@ void AnimationSequencePlayer::updateSounds() { case 4: _mixer->stopHandle(_musicHandle); if ((s = loadSound(p->num, kAnimationSoundType8BitsRAW)) != 0) { - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, s, -1, scaleMixerVolume(p->volume)); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, s, -1, scaleMixerVolume(p->volume)); } break; case 5: if ((s = loadSound(p->num, kAnimationSoundTypeWAV)) != 0) { - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, s, -1, scaleMixerVolume(p->volume)); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, s, -1, scaleMixerVolume(p->volume)); } break; case 6: _mixer->stopHandle(_musicHandle); if ((s = loadSound(p->num, kAnimationSoundType16BitsRAW)) != 0) { - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, s, -1, scaleMixerVolume(p->volume)); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, s, -1, scaleMixerVolume(p->volume)); } break; default: diff --git a/graphics/video/avi_decoder.cpp b/graphics/video/avi_decoder.cpp index 3fb770e6bc..fe5999328e 100644 --- a/graphics/video/avi_decoder.cpp +++ b/graphics/video/avi_decoder.cpp @@ -245,7 +245,7 @@ bool AviDecoder::loadFile(const char *fileName) { // Initialize the video stuff too _audStream = createAudioStream(); if (_audStream) - _mixer->playInputStream(_soundType, _audHandle, _audStream); + _mixer->playStream(_soundType, _audHandle, _audStream); debug (0, "Frames = %d, Dimensions = %d x %d", _header.totalFrames, _header.width, _header.height); debug (0, "Frame Rate = %d", getFrameRate()); diff --git a/graphics/video/coktelvideo/coktelvideo.cpp b/graphics/video/coktelvideo/coktelvideo.cpp index 71ec9eeaad..4d93815b44 100644 --- a/graphics/video/coktelvideo/coktelvideo.cpp +++ b/graphics/video/coktelvideo/coktelvideo.cpp @@ -1068,7 +1068,7 @@ CoktelVideo::State Imd::processFrame(uint16 frame) { } while (hasNextCmd); if (startSound && _soundEnabled) { - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_audioHandle, _audioStream); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_audioHandle, _audioStream); _skipFrames = 0; _soundStage = 2; } @@ -2033,7 +2033,7 @@ CoktelVideo::State Vmd::processFrame(uint16 frame) { if (startSound && _soundEnabled) { if (_hasSound && _audioStream) { - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_audioHandle, _audioStream); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_audioHandle, _audioStream); _skipFrames = 0; _soundStage = 2; } else diff --git a/graphics/video/smk_decoder.cpp b/graphics/video/smk_decoder.cpp index 28fc547010..a919c60574 100644 --- a/graphics/video/smk_decoder.cpp +++ b/graphics/video/smk_decoder.cpp @@ -584,7 +584,7 @@ bool SmackerDecoder::decodeNextFrame() { } if (!_audioStarted) { - _mixer->playInputStream(_soundType, &_audioHandle, _audioStream, -1, 255); + _mixer->playStream(_soundType, &_audioHandle, _audioStream, -1, 255); _audioStarted = true; } } else { diff --git a/sound/audiocd.cpp b/sound/audiocd.cpp index b579048973..7afbd12d03 100644 --- a/sound/audiocd.cpp +++ b/sound/audiocd.cpp @@ -78,7 +78,7 @@ void AudioCDManager::play(int track, int numLoops, int startFrame, int duration, repetitions. Finally, -1 means infinitely many */ _emulating = true; - _mixer->playInputStream(Mixer::kMusicSoundType, &_handle, + _mixer->playStream(Mixer::kMusicSoundType, &_handle, makeLoopingAudioStream(stream, start, end, (numLoops < 1) ? numLoops + 1 : numLoops)); } else { _emulating = false; diff --git a/sound/mixer.cpp b/sound/mixer.cpp index dab1f6144d..bb4ad469f8 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -212,7 +212,7 @@ void MixerImpl::insertChannel(SoundHandle *handle, Channel *chan) { *handle = chanHandle; } -void MixerImpl::playInputStream( +void MixerImpl::playStream( SoundType type, SoundHandle *handle, AudioStream *input, diff --git a/sound/mixer.h b/sound/mixer.h index 92c2a87edb..50702cf8d5 100644 --- a/sound/mixer.h +++ b/sound/mixer.h @@ -115,7 +115,7 @@ public: * not stop this particular stream * @param reverseStereo a flag indicating whether left and right channels shall be swapped */ - virtual void playInputStream( + virtual void playStream( SoundType type, SoundHandle *handle, AudioStream *input, diff --git a/sound/mixer_intern.h b/sound/mixer_intern.h index 2ccd1ff2bf..014be7abf2 100644 --- a/sound/mixer_intern.h +++ b/sound/mixer_intern.h @@ -75,7 +75,7 @@ public: virtual bool isReady() const { return _mixerReady; } - virtual void playInputStream( + virtual void playStream( SoundType type, SoundHandle *handle, AudioStream *input, diff --git a/sound/softsynth/adlib.cpp b/sound/softsynth/adlib.cpp index c7a14d3f50..6697cef646 100644 --- a/sound/softsynth/adlib.cpp +++ b/sound/softsynth/adlib.cpp @@ -918,7 +918,7 @@ int MidiDriver_ADLIB::open() { adlib_write(0xBD, 0x00); create_lookup_table(); - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); return 0; } diff --git a/sound/softsynth/fluidsynth.cpp b/sound/softsynth/fluidsynth.cpp index 57294488a6..c3bd782cc1 100644 --- a/sound/softsynth/fluidsynth.cpp +++ b/sound/softsynth/fluidsynth.cpp @@ -144,7 +144,7 @@ int MidiDriver_FluidSynth::open() { MidiDriver_Emulated::open(); // The MT-32 emulator uses kSFXSoundType here. I don't know why. - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_handle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_handle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); return 0; } diff --git a/sound/softsynth/mt32.cpp b/sound/softsynth/mt32.cpp index 1863ec9c67..8ce8310524 100644 --- a/sound/softsynth/mt32.cpp +++ b/sound/softsynth/mt32.cpp @@ -287,7 +287,7 @@ int MidiDriver_MT32::open() { _initialising = false; g_system->fillScreen(0); g_system->updateScreen(); - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_handle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kSFXSoundType, &_handle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); return 0; } diff --git a/sound/softsynth/ym2612.cpp b/sound/softsynth/ym2612.cpp index 2dbf2ec522..e337bc4ab9 100644 --- a/sound/softsynth/ym2612.cpp +++ b/sound/softsynth/ym2612.cpp @@ -587,7 +587,7 @@ int MidiDriver_YM2612::open() { MidiDriver_Emulated::open(); - _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); return 0; } |