summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2013-11-10 23:39:50 -0600
committerTim Angus <tim@ngus.net>2014-06-17 17:43:36 +0100
commit4d6740bb5867ed21aad4bddc0f67073b8a92c93a (patch)
tree351d70a298e6ae8e6c0aa0a5561df3df73fda461
parenta396e5d88d1108b434ebedff0c60a1458f735cef (diff)
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.
-rw-r--r--src/client/snd_openal.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/snd_openal.c b/src/client/snd_openal.c
index 403d013c..25854dc8 100644
--- a/src/client/snd_openal.c
+++ b/src/client/snd_openal.c
@@ -1849,6 +1849,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;
+ }
}
/*