[Scummvm-cvs-logs] SF.net SVN: scummvm:[47716] scummvm/trunk/engines

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sat Jan 30 16:26:55 CET 2010


Revision: 47716
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47716&view=rev
Author:   lordhoto
Date:     2010-01-30 15:26:54 +0000 (Sat, 30 Jan 2010)

Log Message:
-----------
Replace use of Audio::makeRawMemoryStream by Audio::makeRawStream.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/sound.cpp
    scummvm/trunk/engines/cine/sound.cpp
    scummvm/trunk/engines/draci/sound.cpp
    scummvm/trunk/engines/drascula/sound.cpp
    scummvm/trunk/engines/kyra/sound_towns.cpp
    scummvm/trunk/engines/m4/sound.cpp
    scummvm/trunk/engines/made/resource.cpp
    scummvm/trunk/engines/mohawk/sound.cpp
    scummvm/trunk/engines/mohawk/video/qt_player.cpp
    scummvm/trunk/engines/parallaction/sound_br.cpp
    scummvm/trunk/engines/parallaction/sound_ns.cpp
    scummvm/trunk/engines/queen/sound.cpp
    scummvm/trunk/engines/saga/shorten.cpp
    scummvm/trunk/engines/saga/sound.cpp
    scummvm/trunk/engines/sci/sound/audio.cpp
    scummvm/trunk/engines/sci/sound/iterator/iterator.cpp
    scummvm/trunk/engines/sci/sound/music.cpp
    scummvm/trunk/engines/scumm/he/cup_player_he.cpp
    scummvm/trunk/engines/scumm/he/sound_he.cpp
    scummvm/trunk/engines/scumm/sound.cpp
    scummvm/trunk/engines/sky/intro.cpp
    scummvm/trunk/engines/sky/sound.cpp
    scummvm/trunk/engines/sword1/sound.cpp
    scummvm/trunk/engines/teenagent/teenagent.cpp
    scummvm/trunk/engines/tinsel/sound.cpp
    scummvm/trunk/engines/tucker/sequences.cpp

Modified: scummvm/trunk/engines/agos/sound.cpp
===================================================================
--- scummvm/trunk/engines/agos/sound.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/agos/sound.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -292,7 +292,7 @@
 	assert(buffer);
 	_file->read(buffer, size);
 
-	return Audio::makeRawMemoryStream(buffer, size, 22050, _flags);
+	return Audio::makeRawStream(buffer, size, 22050, _flags);
 }
 
 void RawSound::playSound(uint sound, uint loopSound, Audio::Mixer::SoundType type, Audio::SoundHandle *handle, bool loop, int vol) {
@@ -737,7 +737,7 @@
 	if (_vm->getPlatform() == Common::kPlatformPC)
 		flags = Audio::FLAG_UNSIGNED;
 
-	Audio::AudioStream *stream = Audio::makeRawMemoryStream(buffer, size, freq, flags);
+	Audio::AudioStream *stream = Audio::makeRawStream(buffer, size, freq, flags);
 	_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_effectsHandle, stream);
 }
 

Modified: scummvm/trunk/engines/cine/sound.cpp
===================================================================
--- scummvm/trunk/engines/cine/sound.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/cine/sound.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -845,7 +845,7 @@
 void PaulaSound::playSoundChannel(int channel, int frequency, uint8 *data, int size, int volume) {
 	assert(frequency > 0);
 	frequency = PAULA_FREQ / frequency;
-	Audio::AudioStream *stream = Audio::makeRawMemoryStream(data, size, frequency, 0);
+	Audio::AudioStream *stream = Audio::makeRawStream(data, size, frequency, 0);
 	_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_channelsTable[channel], stream);
 	_mixer->setChannelVolume(_channelsTable[channel], volume * Audio::Mixer::kMaxChannelVolume / 63);
 }

Modified: scummvm/trunk/engines/draci/sound.cpp
===================================================================
--- scummvm/trunk/engines/draci/sound.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/draci/sound.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -202,7 +202,7 @@
 
 	// Don't use DisposeAfterUse::YES, because our caching system deletes samples by itself.
 	Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
-			Audio::makeRawMemoryStream(buffer._data, buffer._length, buffer._frequency, flags, DisposeAfterUse::NO),
+			Audio::makeRawStream(buffer._data, buffer._length, buffer._frequency, flags, DisposeAfterUse::NO),
 			loop ? 0 : 1);
 	_mixer->playInputStream(soundType, handle, stream, -1, volume);
 }

Modified: scummvm/trunk/engines/drascula/sound.cpp
===================================================================
--- scummvm/trunk/engines/drascula/sound.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/drascula/sound.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -185,7 +185,7 @@
 		if (ConfMan.getBool("speech_mute"))
 			memset(soundData, 0x80, soundSize); // Mute speech but keep the pause
 
-		Audio::AudioStream *stream = Audio::makeRawMemoryStream(soundData, soundSize - 64,
+		Audio::AudioStream *stream = Audio::makeRawStream(soundData, soundSize - 64,
 						11025, Audio::FLAG_UNSIGNED);
 		_mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_soundHandle, stream);
 	} else

Modified: scummvm/trunk/engines/kyra/sound_towns.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_towns.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/kyra/sound_towns.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -3925,7 +3925,7 @@
 
 	uint32 outputRate = uint32(11025 * calculatePhaseStep(note, sfxRootNoteOffs, sfxRate, 11025, 0x2000));
 
-	_currentSFX = Audio::makeRawMemoryStream(sfxPlaybackBuffer, playbackBufferSize,
+	_currentSFX = Audio::makeRawStream(sfxPlaybackBuffer, playbackBufferSize,
 							outputRate, Audio::FLAG_UNSIGNED | Audio::FLAG_LITTLE_ENDIAN);
 	_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, _currentSFX);
 }
@@ -4297,7 +4297,7 @@
 
 	uint32 outputRate = uint32(11025 * SoundTowns::calculatePhaseStep(0x3c, 0x3c, sfxRate, 11025, 0x2000));
 
-	_currentSFX = Audio::makeRawMemoryStream(sfx, outsize, outputRate,
+	_currentSFX = Audio::makeRawStream(sfx, outsize, outputRate,
 							Audio::FLAG_UNSIGNED | Audio::FLAG_LITTLE_ENDIAN);
 	_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_soundChannels[h], _currentSFX);
 	if (handle)

Modified: scummvm/trunk/engines/m4/sound.cpp
===================================================================
--- scummvm/trunk/engines/m4/sound.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/m4/sound.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -94,7 +94,7 @@
 
 	// Sound format is 8bit mono, unsigned, 11025kHz
 	Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
-				Audio::makeRawMemoryStream(buffer, bufferSize, 11025, Audio::FLAG_UNSIGNED),
+				Audio::makeRawStream(buffer, bufferSize, 11025, Audio::FLAG_UNSIGNED),
 				loop ? 0 : 1);
 	_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &handle->handle, stream, -1, volume);
 }
@@ -146,7 +146,7 @@
 	_vm->res()->toss(soundName);
 
 	// Voice format is 8bit mono, unsigned, 11025kHz
-	Audio::AudioStream *stream = Audio::makeRawMemoryStream(buffer, soundStream->size(), 11025, Audio::FLAG_UNSIGNED);
+	Audio::AudioStream *stream = Audio::makeRawStream(buffer, soundStream->size(), 11025, Audio::FLAG_UNSIGNED);
 	_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &handle->handle, stream, -1, volume);
 }
 
@@ -259,7 +259,7 @@
 
 	// Play sound
 	Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
-				Audio::makeRawMemoryStream(buffer,
+				Audio::makeRawStream(buffer,
 					_dsrFile.dsrEntries[soundIndex]->uncompSize,
 					_dsrFile.dsrEntries[soundIndex]->frequency, Audio::FLAG_UNSIGNED),
 				loop ? 0 : 1);

Modified: scummvm/trunk/engines/made/resource.cpp
===================================================================
--- scummvm/trunk/engines/made/resource.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/made/resource.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -262,7 +262,7 @@
 
 Audio::AudioStream *SoundResource::getAudioStream(int soundRate, bool loop) {
 	Audio::RewindableAudioStream *stream =
-			Audio::makeRawMemoryStream(_soundData, _soundSize, soundRate, Audio::FLAG_UNSIGNED, DisposeAfterUse::NO);
+			Audio::makeRawStream(_soundData, _soundSize, soundRate, Audio::FLAG_UNSIGNED, DisposeAfterUse::NO);
 
 	if (loop)
 		return Audio::makeLoopingAudioStream(stream, 0);

Modified: scummvm/trunk/engines/mohawk/sound.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/sound.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/mohawk/sound.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -461,7 +461,7 @@
 		if (data_chunk.channels == 2)
 			flags |= Audio::FLAG_STEREO;
 
-		return Audio::makeRawMemoryStream(data_chunk.audio_data, data_chunk.size, data_chunk.sample_rate, flags);
+		return Audio::makeRawStream(data_chunk.audio_data, data_chunk.size, data_chunk.sample_rate, flags);
 	} else if (data_chunk.encoding == kCodecADPCM) {
 		Common::MemoryReadStream *dataStream = new Common::MemoryReadStream(data_chunk.audio_data, data_chunk.size, DisposeAfterUse::YES);
 		uint32 blockAlign = data_chunk.channels * data_chunk.bitsPerSample / 8;
@@ -501,7 +501,7 @@
 	stream->read(data, size);
 	delete stream;
 
-	return Audio::makeRawMemoryStream(data, size, rate, Audio::FLAG_UNSIGNED);
+	return Audio::makeRawStream(data, size, rate, Audio::FLAG_UNSIGNED);
 }
 
 SndHandle *Sound::getHandle() {

Modified: scummvm/trunk/engines/mohawk/video/qt_player.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/video/qt_player.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/mohawk/video/qt_player.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -1170,7 +1170,7 @@
 		byte *data = (byte *)malloc(dataSize);
 		stream->read(data, dataSize);
 		delete stream;
-		return Audio::makeRawMemoryStream(data, dataSize, _streams[_audioStreamIndex]->sample_rate, flags);
+		return Audio::makeRawStream(data, dataSize, _streams[_audioStreamIndex]->sample_rate, flags);
 	} else if (_streams[_audioStreamIndex]->codec_tag == MKID_BE('ima4')) {
 		// Riven uses this codec (as do some Myst ME videos)
 		return Audio::makeADPCMStream(stream, true, stream->size(), Audio::kADPCMApple, _streams[_audioStreamIndex]->sample_rate, _streams[_audioStreamIndex]->channels, 34);

Modified: scummvm/trunk/engines/parallaction/sound_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/sound_br.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/parallaction/sound_br.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -416,7 +416,7 @@
 	int rate = 11025;
 
 	ch->stream = Audio::makeLoopingAudioStream(
-			Audio::makeRawMemoryStream(data, dataSize, rate, Audio::FLAG_UNSIGNED),
+			Audio::makeRawStream(data, dataSize, rate, Audio::FLAG_UNSIGNED),
 			looping ? 0 : 1);
 	return ch->stream;
 }
@@ -477,7 +477,7 @@
 
 		// TODO: Confirm sound rate
 		int rate = 11025;
-		input = Audio::makeRawMemoryStream((byte *)data, dataSize, rate, 0);
+		input = Audio::makeRawStream((byte *)data, dataSize, rate, 0);
 	} else {
 		input = Audio::make8SVXStream(*stream, looping);
 	}

Modified: scummvm/trunk/engines/parallaction/sound_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/sound_ns.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/parallaction/sound_ns.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -377,7 +377,7 @@
 	if (!scumm_stricmp("beep", filename)) {
 		int rate = 11934;
 		ch->volume = 160;
-		input = Audio::makeRawMemoryStream((byte *)beepSoundBuffer, beepSoundBufferSize, rate, 0, DisposeAfterUse::NO);
+		input = Audio::makeRawStream((byte *)beepSoundBuffer, beepSoundBufferSize, rate, 0, DisposeAfterUse::NO);
 	} else {
 		Common::SeekableReadStream *stream = _vm->_disk->loadSound(filename);
 		input = Audio::make8SVXStream(*stream, looping);

Modified: scummvm/trunk/engines/queen/sound.cpp
===================================================================
--- scummvm/trunk/engines/queen/sound.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/queen/sound.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -330,7 +330,7 @@
 		f->read(sound, size);
 		Audio::Mixer::SoundType type = (soundHandle == &_speechHandle) ? Audio::Mixer::kSpeechSoundType : Audio::Mixer::kSFXSoundType;
 
-		Audio::AudioStream *stream = Audio::makeRawMemoryStream(sound, size, 11840, Audio::FLAG_UNSIGNED);
+		Audio::AudioStream *stream = Audio::makeRawStream(sound, size, 11840, Audio::FLAG_UNSIGNED);
 		_mixer->playInputStream(type, soundHandle, stream);
 	}
 }
@@ -614,7 +614,7 @@
 		if (soundData) {
 			f->read(soundData, soundSize);
 
-			Audio::AudioStream *stream = Audio::makeRawMemoryStream(soundData, soundSize, 11025, 0);
+			Audio::AudioStream *stream = Audio::makeRawStream(soundData, soundSize, 11025, 0);
 			_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, stream);
 		}
 	}

Modified: scummvm/trunk/engines/saga/shorten.cpp
===================================================================
--- scummvm/trunk/engines/saga/shorten.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/saga/shorten.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -522,7 +522,7 @@
 		return 0;
 
 	// Since we allocated our own buffer for the data, we must specify DisposeAfterUse::YES.
-	return Audio::makeRawMemoryStream(data, size, rate, flags);
+	return Audio::makeRawStream(data, size, rate, flags);
 }
 
 } // End of namespace Audio

Modified: scummvm/trunk/engines/saga/sound.cpp
===================================================================
--- scummvm/trunk/engines/saga/sound.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/saga/sound.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -73,7 +73,7 @@
 				Audio::Mixer::kSpeechSoundType : Audio::Mixer::kSFXSoundType;
 
 	if (!buffer.isCompressed) {
-		stream = Audio::makeRawMemoryStream(buffer.buffer, buffer.size, buffer.frequency, buffer.flags);
+		stream = Audio::makeRawStream(buffer.buffer, buffer.size, buffer.frequency, buffer.flags);
 	} else {
 		Common::SeekableReadStream *memStream = new Common::MemoryReadStream(buffer.buffer, buffer.size, DisposeAfterUse::YES);
 

Modified: scummvm/trunk/engines/sci/sound/audio.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/audio.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/sci/sound/audio.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -252,7 +252,7 @@
 	}
 
 	if (data)
-		audioStream = Audio::makeRawMemoryStream(data, size, _audioRate, flags);
+		audioStream = Audio::makeRawStream(data, size, _audioRate, flags);
 
 	if (audioStream) {
 		*sampleLen = (flags & Audio::FLAG_16BITS ? size >> 1 : size) * 60 / _audioRate;

Modified: scummvm/trunk/engines/sci/sound/iterator/iterator.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/iterator/iterator.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/sci/sound/iterator/iterator.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -552,7 +552,7 @@
 
 	// Convert stream format flags
 	int flags = Audio::FLAG_UNSIGNED;
-	return Audio::makeRawMemoryStream(sound, size, rate, flags);
+	return Audio::makeRawStream(sound, size, rate, flags);
 }
 
 Audio::AudioStream *Sci0SongIterator::getAudioStream() {

Modified: scummvm/trunk/engines/sci/sound/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/music.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/sci/sound/music.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -190,7 +190,7 @@
 			if (_soundVersion >= SCI_VERSION_1_EARLY && ((SciEngine *)g_engine)->getPlatform() == Common::kPlatformAmiga)
 				flags = 0;
 			int endPart = track->digitalSampleEnd > 0 ? (track->digitalSampleSize - track->digitalSampleEnd) : 0;
-			pSnd->pStreamAud = Audio::makeRawMemoryStream(channelData + track->digitalSampleStart, 
+			pSnd->pStreamAud = Audio::makeRawStream(channelData + track->digitalSampleStart, 
 								track->digitalSampleSize - track->digitalSampleStart - endPart, 
 								track->digitalSampleRate, flags, DisposeAfterUse::NO);
 			delete pSnd->pLoopStream;

Modified: scummvm/trunk/engines/scumm/he/cup_player_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/cup_player_he.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/scumm/he/cup_player_he.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -171,7 +171,7 @@
 				uint32 soundSize = READ_BE_UINT32(soundData + 4);
 				_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &sfxChannel->handle,
 							Audio::makeLoopingAudioStream(
-								Audio::makeRawMemoryStream(soundData + 8, soundSize - 8,
+								Audio::makeRawStream(soundData + 8, soundSize - 8,
 										11025, Audio::FLAG_UNSIGNED, DisposeAfterUse::NO),
 								(sfx->flags & kSfxFlagLoop) ? 0 : 1
 							)

Modified: scummvm/trunk/engines/scumm/he/sound_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/sound_he.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/scumm/he/sound_he.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -574,7 +574,7 @@
 		musicFile.close();
 
 		if (_vm->_game.heversion == 70) {
-			stream = Audio::makeRawMemoryStream(spoolPtr, size, 11025, flags, DisposeAfterUse::NO);
+			stream = Audio::makeRawStream(spoolPtr, size, 11025, flags, DisposeAfterUse::NO);
 			_mixer->playInputStream(type, &_heSoundChannels[heChannel], stream, soundID);
 			return;
 		}
@@ -667,9 +667,9 @@
 #ifdef SCUMM_LITTLE_ENDIAN
 			flags |= Audio::FLAG_LITTLE_ENDIAN;
 #endif
-			stream = Audio::makeRawMemoryStream(sound + heOffset, size - heOffset, rate, flags);
+			stream = Audio::makeRawStream(sound + heOffset, size - heOffset, rate, flags);
 		} else {
-			stream = Audio::makeRawMemoryStream(ptr + memStream.pos() + heOffset, size - heOffset, rate, flags, DisposeAfterUse::NO);
+			stream = Audio::makeRawStream(ptr + memStream.pos() + heOffset, size - heOffset, rate, flags, DisposeAfterUse::NO);
 		}
 		_mixer->playInputStream(type, &_heSoundChannels[heChannel],
 						Audio::makeLoopingAudioStream(stream, (heFlags & 1) ? 0 : 1), soundID);
@@ -729,7 +729,7 @@
 
 		_mixer->stopHandle(_heSoundChannels[heChannel]);
 
-		stream = Audio::makeRawMemoryStream(ptr + heOffset + 8, size, rate, flags, DisposeAfterUse::NO);
+		stream = Audio::makeRawStream(ptr + heOffset + 8, size, rate, flags, DisposeAfterUse::NO);
 		_mixer->playInputStream(type, &_heSoundChannels[heChannel],
 						Audio::makeLoopingAudioStream(stream, (heFlags & 1) ? 0 : 1), soundID);
 	}
@@ -750,7 +750,7 @@
 		_mixer->stopID(_currentMusic);
 		_currentMusic = soundID;
 
-		stream = Audio::makeRawMemoryStream(sound, size, rate, 0);
+		stream = Audio::makeRawStream(sound, size, rate, 0);
 		_mixer->playInputStream(Audio::Mixer::kMusicSoundType, NULL, stream, soundID);
 	}
 	else if (READ_BE_UINT32(ptr) == MKID_BE('MIDI')) {

Modified: scummvm/trunk/engines/scumm/sound.cpp
===================================================================
--- scummvm/trunk/engines/scumm/sound.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/scumm/sound.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -203,7 +203,7 @@
 		sound = (byte *)malloc(size);
 		memcpy(sound, ptr, size);
 
-		stream = Audio::makeRawMemoryStream(sound, size, rate, Audio::FLAG_UNSIGNED);
+		stream = Audio::makeRawStream(sound, size, rate, Audio::FLAG_UNSIGNED);
 		_mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID);
 	}
 	// WORKAROUND bug # 1311447
@@ -226,7 +226,7 @@
 		// Allocate a sound buffer, copy the data into it, and play
 		sound = (byte *)malloc(size);
 		memcpy(sound, ptr, size);
-		stream = Audio::makeRawMemoryStream(sound, size, rate, Audio::FLAG_UNSIGNED);
+		stream = Audio::makeRawStream(sound, size, rate, Audio::FLAG_UNSIGNED);
 		_mixer->playInputStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID);
 	}
 	// Support for sampled sound effects in Monkey Island 1 and 2
@@ -298,7 +298,7 @@
 		// Allocate a sound buffer, copy the data into it, and play
 		sound = (byte *)malloc(size);
 		memcpy(sound, ptr + 6, size);
-		stream = Audio::makeRawMemoryStream(sound, size, rate, Audio::FLAG_UNSIGNED);
+		stream = Audio::makeRawStream(sound, size, rate, Audio::FLAG_UNSIGNED);
 		_mixer->playInputStream(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')) {

Modified: scummvm/trunk/engines/sky/intro.cpp
===================================================================
--- scummvm/trunk/engines/sky/intro.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/sky/intro.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -739,7 +739,7 @@
 		// directly, but this will have to do for now.
 		memset(vData, 127, sizeof(DataFileHeader));
 
-		stream = Audio::makeRawMemoryStream(vData, _skyDisk->_lastLoadedFileSize, 11025, Audio::FLAG_UNSIGNED);
+		stream = Audio::makeRawStream(vData, _skyDisk->_lastLoadedFileSize, 11025, Audio::FLAG_UNSIGNED);
 		_mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_voice, stream, SOUND_VOICE);
 		return true;
 	case WAITVOICE:
@@ -755,12 +755,12 @@
 		return true;
 	case LOOPBG:
 		_mixer->stopID(SOUND_BG);
-		stream = Audio::makeRawMemoryStream(_bgBuf + 256, _bgSize - 768, 11025, Audio::FLAG_UNSIGNED);
+		stream = Audio::makeRawStream(_bgBuf + 256, _bgSize - 768, 11025, Audio::FLAG_UNSIGNED);
 		_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_bgSfx, Audio::makeLoopingAudioStream(stream, 0), SOUND_BG);
 		return true;
 	case PLAYBG:
 		_mixer->stopID(SOUND_BG);
-		stream = Audio::makeRawMemoryStream(_bgBuf + 256, _bgSize - 768, 11025, Audio::FLAG_UNSIGNED);
+		stream = Audio::makeRawStream(_bgBuf + 256, _bgSize - 768, 11025, Audio::FLAG_UNSIGNED);
 		_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_bgSfx, stream, SOUND_BG);
 		return true;
 	case STOPBG:

Modified: scummvm/trunk/engines/sky/sound.cpp
===================================================================
--- scummvm/trunk/engines/sky/sound.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/sky/sound.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -1045,7 +1045,7 @@
 
 	_mixer->stopID(id);
 
-	Audio::AudioStream *stream = Audio::makeRawMemoryStream(buffer, size, 11025, flags);
+	Audio::AudioStream *stream = Audio::makeRawStream(buffer, size, 11025, flags);
 	_mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, stream, id);
 }
 
@@ -1111,7 +1111,7 @@
 	uint32 dataLoop = READ_BE_UINT16(_sfxInfo + (sound << 3) + 6);
 	dataOfs += _sfxBaseOfs;
 
-	Audio::SeekableAudioStream *stream = Audio::makeRawMemoryStream(_soundData + dataOfs, dataSize, sampleRate,
+	Audio::SeekableAudioStream *stream = Audio::makeRawStream(_soundData + dataOfs, dataSize, sampleRate,
 	                                                                Audio::FLAG_UNSIGNED, DisposeAfterUse::NO);
 
 	Audio::AudioStream *output = 0;
@@ -1251,7 +1251,7 @@
 
 	_mixer->stopID(SOUND_SPEECH);
 
-	Audio::AudioStream *stream = Audio::makeRawMemoryStream(playBuffer, speechSize, rate, Audio::FLAG_UNSIGNED);
+	Audio::AudioStream *stream = Audio::makeRawStream(playBuffer, speechSize, rate, Audio::FLAG_UNSIGNED);
 	_mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_ingameSpeech, stream, SOUND_SPEECH);
 	return true;
 }

Modified: scummvm/trunk/engines/sword1/sound.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sound.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/sword1/sound.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -272,7 +272,7 @@
 						if (READ_LE_UINT16(sampleData + 0x16) == 2)
 							flags |= Audio::FLAG_STEREO;
 						Audio::AudioStream *stream = Audio::makeLoopingAudioStream(
-									Audio::makeRawMemoryStream(sampleData + 0x2C, size, 11025, flags, DisposeAfterUse::NO),
+									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);
 					}
@@ -361,7 +361,7 @@
 			uint32 size;
 			int16 *data = uncompressSpeech(index + _cowHeaderSize, sampleSize, &size);
 			if (data) {
-				stream = Audio::makeRawMemoryStream((byte *)data, size, 11025, SPEECH_FLAGS);
+				stream = Audio::makeRawStream((byte *)data, size, 11025, SPEECH_FLAGS);
 				_mixer->playInputStream(Audio::Mixer::kSpeechSoundType, &_speechHandle, stream, SOUND_SPEECH_ID, speechVol, speechPan);
 			}
 		} else if (_cowMode == CowPSX && sampleSize != 0xffffffff) {

Modified: scummvm/trunk/engines/teenagent/teenagent.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/teenagent.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/teenagent/teenagent.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -898,7 +898,7 @@
 	in->read(data, size);
 	//debug(0, "playing %u samples...", size);
 
-	Audio::AudioStream *stream = Audio::makeRawMemoryStream(data, size, 11025, 0);
+	Audio::AudioStream *stream = Audio::makeRawStream(data, size, 11025, 0);
 	_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_soundHandle, stream);
 }
 

Modified: scummvm/trunk/engines/tinsel/sound.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/sound.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/tinsel/sound.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -154,7 +154,7 @@
 			#endif
 			break;
 		default:
-			sampleStream = Audio::makeRawMemoryStream(sampleBuf, sampleLen, 22050, Audio::FLAG_UNSIGNED);
+			sampleStream = Audio::makeRawStream(sampleBuf, sampleLen, 22050, Audio::FLAG_UNSIGNED);
 			break;
 		}
 		if (sampleStream) {

Modified: scummvm/trunk/engines/tucker/sequences.cpp
===================================================================
--- scummvm/trunk/engines/tucker/sequences.cpp	2010-01-30 15:19:15 UTC (rev 47715)
+++ scummvm/trunk/engines/tucker/sequences.cpp	2010-01-30 15:26:54 UTC (rev 47716)
@@ -599,7 +599,7 @@
 				uint8 *sampleData = (uint8 *)malloc(size);
 				if (sampleData) {
 					f.read(sampleData, size);
-					stream = Audio::makeRawMemoryStream(sampleData, size, rate, flags);
+					stream = Audio::makeRawStream(sampleData, size, rate, flags);
 				}
 			}
 			break;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list