1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 00:02:13 +00:00

ao/audiounit: include AVAudioSession buffer in latency calc

Signed-off-by: Aman Gupta <aman@tmm1.net>
This commit is contained in:
Aman Gupta 2019-02-08 15:16:29 -08:00
parent e35aca3cb4
commit 8b114e574a

View File

@ -155,7 +155,7 @@ static void start(struct ao *ao)
struct priv *p = ao->priv;
AVAudioSession *instance = AVAudioSession.sharedInstance;
p->device_latency = [instance outputLatency];
p->device_latency = [instance outputLatency] + [instance IOBufferDuration];
OSStatus err = AudioOutputUnitStart(p->audio_unit);
CHECK_CA_WARN("can't start audio unit");