[Scummvm-cvs-logs] SF.net SVN: scummvm:[53939] scummvm/trunk/engines/sword25/fmv/ theora_decoder.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sat Oct 30 11:17:21 CEST 2010


Revision: 53939
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53939&view=rev
Author:   eriktorbjorn
Date:     2010-10-30 09:17:21 +0000 (Sat, 30 Oct 2010)

Log Message:
-----------
SWORD25: Play the cutscene audio

Once the audio buffer has been queued in the audio stream, the Theora
decoder is no longer responsible for it. It has to allocate a new
audio buffer for the next set of audio data.

Of course, at the moment the audio is pretty useless because the
playback speed is all wrong.

Modified Paths:
--------------
    scummvm/trunk/engines/sword25/fmv/theora_decoder.cpp

Modified: scummvm/trunk/engines/sword25/fmv/theora_decoder.cpp
===================================================================
--- scummvm/trunk/engines/sword25/fmv/theora_decoder.cpp	2010-10-30 08:21:10 UTC (rev 53938)
+++ scummvm/trunk/engines/sword25/fmv/theora_decoder.cpp	2010-10-30 09:17:21 UTC (rev 53939)
@@ -412,10 +412,11 @@
 
 	// If playback has begun, top audio buffer off immediately.
 	if (_stateFlag && _audiobufReady) {
-/* FIXME: This is currently crashing
 		_audStream->queueBuffer((byte *)_audiobuf, AUDIOFD_FRAGSIZE, DisposeAfterUse::NO, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN | Audio::FLAG_STEREO);
-*/
 
+		// The audio mixer is now responsible for the old audio buffer.
+		// We need to create a new one.
+		_audiobuf = (ogg_int16_t *)calloc(AUDIOFD_FRAGSIZE, sizeof(ogg_int16_t));
 		_audiobufFill = 0;
 		_audiobufReady = false;
 	}


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