aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2010-10-30 09:17:21 +0000
committerTorbjörn Andersson2010-10-30 09:17:21 +0000
commit71e08336c03a6f2f472dd0144e4744bf8797e9bd (patch)
tree943641180128991ea06109a8be5bf3df434cdb55
parent09c678e3631567330123b5035f3798fbbd6e8e82 (diff)
downloadscummvm-rg350-71e08336c03a6f2f472dd0144e4744bf8797e9bd.tar.gz
scummvm-rg350-71e08336c03a6f2f472dd0144e4744bf8797e9bd.tar.bz2
scummvm-rg350-71e08336c03a6f2f472dd0144e4744bf8797e9bd.zip
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. svn-id: r53939
-rw-r--r--engines/sword25/fmv/theora_decoder.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sword25/fmv/theora_decoder.cpp b/engines/sword25/fmv/theora_decoder.cpp
index 02e18b8fba..d211136614 100644
--- a/engines/sword25/fmv/theora_decoder.cpp
+++ b/engines/sword25/fmv/theora_decoder.cpp
@@ -412,10 +412,11 @@ Graphics::Surface *TheoraDecoder::decodeNextFrame() {
// 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;
}