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
This commit is contained in:
Torbjörn Andersson 2010-10-30 09:17:21 +00:00
parent 09c678e363
commit 71e08336c0

View File

@ -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;
}