[Scummvm-cvs-logs] scummvm master -> d70d6c4c50942ec3679fce07ff6045b5d18ed9a1

fuzzie fuzzie at fuzzie.org
Sat Nov 5 00:22:20 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:
d70d6c4c50 COMPOSER: Play V1 pipe audio.


Commit: d70d6c4c50942ec3679fce07ff6045b5d18ed9a1
    https://github.com/scummvm/scummvm/commit/d70d6c4c50942ec3679fce07ff6045b5d18ed9a1
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-11-04T16:21:05-07:00

Commit Message:
COMPOSER: Play V1 pipe audio.

Changed paths:
    engines/composer/graphics.cpp
    engines/composer/resource.cpp



diff --git a/engines/composer/graphics.cpp b/engines/composer/graphics.cpp
index dc0c99a..bd3cc3a 100644
--- a/engines/composer/graphics.cpp
+++ b/engines/composer/graphics.cpp
@@ -352,6 +352,10 @@ void ComposerEngine::processAnimFrame() {
 	for (Common::List<Pipe *>::iterator j = _pipes.begin(); j != _pipes.end(); j++) {
 		Pipe *pipe = *j;
 		pipe->nextFrame();
+
+		// V1 pipe audio; see OldPipe
+		if (pipe->hasResource(ID_WAVE, 0xffff))
+			playWaveForAnim(0xffff, 0, false);
 	}
 }
 
diff --git a/engines/composer/resource.cpp b/engines/composer/resource.cpp
index ce2661f..6d7f2f2 100644
--- a/engines/composer/resource.cpp
+++ b/engines/composer/resource.cpp
@@ -385,9 +385,17 @@ void OldPipe::nextFrame() {
 		spriteResMap[spriteIds[i]].entries.push_back(entry);
 	}
 
-	// FIXME
-	uint32 audioDataOffset = _stream->pos();
-	_stream->skip(audioSize);
+	ResourceMap &audioResMap = _types[ID_WAVE];
+	audioResMap.clear();
+
+	if (audioSize > 0) {
+		PipeResourceEntry entry;
+		entry.size = audioSize;
+		entry.offset = _stream->pos();
+		// we use 0xffff for per-frame pipe audio
+		audioResMap[0xffff].entries.push_back(entry);
+		_stream->skip(audioSize);
+	}
 
 	_offset = _stream->pos();
 	_currFrame++;






More information about the Scummvm-git-logs mailing list