diff options
author | Mad Fish <MadFishTheOne@gmail.com> | 2013-01-20 16:37:30 +0100 |
---|---|---|
committer | Mad Fish <MadFishTheOne@gmail.com> | 2013-01-20 16:37:30 +0100 |
commit | 5b7327920b1500c33342c021e70136973972fbce (patch) | |
tree | 8acb7378f0d3eb58513d1fb7297728e2fca631ba | |
parent | 326820b0ff437e044a5dcf1788fd1fc5e811067c (diff) | |
download | mpv-5b7327920b1500c33342c021e70136973972fbce.tar.bz2 mpv-5b7327920b1500c33342c021e70136973972fbce.tar.xz |
ao_coreaudio: use 0 as timeout for CFRunLoopRunInMode
Handle all pending events and exit instead of waiting. When there are lots of
input events (for example, scrolling with trackpad), timeout can add up
to make a huge frame delay. In my tests, if I scroll fast enough, that loop
would never exit.
-rw-r--r-- | audio/out/ao_coreaudio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao_coreaudio.c b/audio/out/ao_coreaudio.c index c7a6f92ea9..7993eac910 100644 --- a/audio/out/ao_coreaudio.c +++ b/audio/out/ao_coreaudio.c @@ -1104,7 +1104,7 @@ static int play(void* output_samples,int num_bytes,int flags) audio_resume(); do { - exit_reason = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.01, true); + exit_reason = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true); } while (exit_reason == kCFRunLoopRunHandledSource); return wrote; |