ao_coreaudio: Process the CoreFoundation runloop

Process it in case the vo doesn't do that, e.g. when vo_corevideo is
used with shared_buffer.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31717 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
adrian 2010-07-11 21:14:48 +00:00 committed by Uoti Urpala
parent 2d35ff8332
commit 4505a8f06a
1 changed files with 6 additions and 0 deletions

View File

@ -1025,6 +1025,7 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice,
static int play(void* output_samples,int num_bytes,int flags)
{
int wrote, b_digital;
SInt32 exit_reason;
// Check whether we need to reset the digital output stream.
if (ao->b_digital && ao->b_stream_format_changed)
@ -1052,6 +1053,11 @@ static int play(void* output_samples,int num_bytes,int flags)
wrote=write_buffer(output_samples, num_bytes);
audio_resume();
do {
exit_reason = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.01, true);
} while (exit_reason == kCFRunLoopRunHandledSource);
return wrote;
}