mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 09:02:38 +00:00
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:
parent
2d35ff8332
commit
4505a8f06a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user