From 4505a8f06ac7f7b11fe0a1478f6ccfb9b3d559c2 Mon Sep 17 00:00:00 2001 From: adrian Date: Sun, 11 Jul 2010 21:14:48 +0000 Subject: 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 --- libao2/ao_coreaudio.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libao2') diff --git a/libao2/ao_coreaudio.c b/libao2/ao_coreaudio.c index e3ed62136c..7ceaff6646 100644 --- a/libao2/ao_coreaudio.c +++ b/libao2/ao_coreaudio.c @@ -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; } -- cgit v1.2.3