[Scummvm-cvs-logs] scummvm master -> 56690162250f577f448c4edc2cc455c99234513a

lordhoto lordhoto at gmail.com
Thu Nov 24 23:13:21 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
5669016225 TOUCHE: Fix playback of simultaneous sfx.


Commit: 56690162250f577f448c4edc2cc455c99234513a
    https://github.com/scummvm/scummvm/commit/56690162250f577f448c4edc2cc455c99234513a
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-11-24T14:10:51-08:00

Commit Message:
TOUCHE: Fix playback of simultaneous sfx.

Since we stream the VOC files from disk now, we can not use the global
resource file handle for playback but instead need to open a new handle for
every SFX started.

Fixes odd noises at the beginning of the Touche demo.

Changed paths:
    engines/touche/resource.cpp



diff --git a/engines/touche/resource.cpp b/engines/touche/resource.cpp
index 6df6fc0..0790d72 100644
--- a/engines/touche/resource.cpp
+++ b/engines/touche/resource.cpp
@@ -590,8 +590,14 @@ void ToucheEngine::res_loadSound(int priority, int num) {
 	if (priority >= 0) {
 		uint32 size;
 		const uint32 offs = res_getDataOffset(kResourceTypeSound, num, &size);
-		_fData.seek(offs);
-		Audio::AudioStream *stream = Audio::makeVOCStream(&_fData, Audio::FLAG_UNSIGNED);
+		Common::SeekableReadStream *datastream = SearchMan.createReadStreamForMember("TOUCHE.DAT");
+		if (!datastream) {
+			warning("res_loadSound: Could not open TOUCHE.DAT");
+			return;
+		}
+
+		datastream->seek(offs);
+		Audio::AudioStream *stream = Audio::makeVOCStream(datastream, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
 		if (stream) {
 			_mixer->playStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, stream);
 		}






More information about the Scummvm-git-logs mailing list