# HG changeset patch # User adrian # Date 1278882888 0 # Node ID 1b5102a113e00eea21c73a121e667a1ee4c73e85 # Parent 955cdbd3ac023fa2822d92e27337eb4f7b6675f3 Process the CoreFoundation runloop in ao_coreaudio in case it's not being processed in the vo, e.g. when vo_corevideo is used with shared_buffer. diff -r 955cdbd3ac02 -r 1b5102a113e0 libao2/ao_coreaudio.c --- a/libao2/ao_coreaudio.c Sun Jul 11 21:12:20 2010 +0000 +++ b/libao2/ao_coreaudio.c Sun Jul 11 21:14:48 2010 +0000 @@ -1025,6 +1025,7 @@ 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 @@ wrote=write_buffer(output_samples, num_bytes); audio_resume(); + + do { + exit_reason = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.01, true); + } while (exit_reason == kCFRunLoopRunHandledSource); + return wrote; }