Skip to content

Commit

Permalink
Fix cinematics often being silent on OS X
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zturtleman committed Nov 11, 2013
1 parent b3bd74f commit 203ab7b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/client/snd_openal.c
Expand Up @@ -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;
}
}

/*
Expand Down

0 comments on commit 203ab7b

Please sign in to comment.