Skip to content

Commit

Permalink
ao/audiounit: include AVAudioSession buffer in latency calc
Browse files Browse the repository at this point in the history
Signed-off-by: Aman Gupta <aman@tmm1.net>
  • Loading branch information
tmm1 committed Apr 5, 2019
1 parent e35aca3 commit 8b114e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion audio/out/ao_audiounit.m
Expand Up @@ -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");
Expand Down

0 comments on commit 8b114e5

Please sign in to comment.