mirror of
https://github.com/mpv-player/mpv
synced 2025-01-12 01:49:33 +00:00
ao_coreaudio: set ao->device_buffer base on hardware latency
This commit is contained in:
parent
4e6d591f12
commit
a791408659
@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include <CoreAudio/HostTime.h>
|
||||
#include <libavutil/mathematics.h>
|
||||
|
||||
#include "ao.h"
|
||||
#include "internal.h"
|
||||
@ -178,6 +179,7 @@ static int init(struct ao *ao)
|
||||
goto coreaudio_error;
|
||||
|
||||
reinit_latency(ao);
|
||||
ao->device_buffer = av_rescale(p->hw_latency_ns, ao->samplerate, 1000000000) * 2;
|
||||
|
||||
p->queue = dispatch_queue_create("io.mpv.coreaudio_stop_during_idle",
|
||||
DISPATCH_QUEUE_SERIAL);
|
||||
|
Loading…
Reference in New Issue
Block a user