From 203ab7b9af3f76e866ee6ba2a19427278cbbc001 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 10 Nov 2013 23:39:50 -0600 Subject: [PATCH] Fix cinematics often being silent on OS X If OpenAL source isn't playing, often what happens is: queued buffers is 0 and processed buffers is non-0. S_AL_StreamUpdate won't play the steam if queued buffers 0. So start the stream in S_AL_RawSamples. --- code/client/snd_openal.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/client/snd_openal.c b/code/client/snd_openal.c index b42eae59..e2d19990 100644 --- a/code/client/snd_openal.c +++ b/code/client/snd_openal.c @@ -1830,6 +1830,13 @@ void S_AL_RawSamples(int stream, int samples, int rate, int width, int channels, // Volume S_AL_Gain (streamSources[stream], volume * s_volume->value * s_alGain->value); } + + // Start stream + if(!streamPlaying[stream]) + { + qalSourcePlay( streamSources[stream] ); + streamPlaying[stream] = qtrue; + } } /*