Commit 998e5a04 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

xaudio2: Don't render less than a period of audio.

Sometimes the ALSA driver will report a very small amount of frames available after a period signal. There is a bug in OpenAL 1.15 which will crash the application if alcRenderSamplesSOFT is called with less than 4 frames. And anyway, we shouldn't incur all of this overhead just to render a couple of frames. So, just skip the rendering step if we have less than a period of space available in the driver. Signed-off-by: 's avatarAndrew Eikum <aeikum@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent c5b54b34
......@@ -2723,7 +2723,11 @@ static void do_engine_tick(IXAudio2Impl *This)
}
nframes = This->period_frames * 3 - pad;
TRACE("going to render %u frames\n", nframes);
TRACE("frames available: %u\n", nframes);
if(nframes < This->period_frames)
return;
if(!nframes)
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment