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.
This commit is contained in:
1 parent
326820b0ff
commit
5b7327920b
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user