Bug Fix: Latency reporting for high latency output

Fixes visualization latency under virtual machines, at least. Not sure
which local or native systems would be reporting high latency here, but
this should fix them as well.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-03-06 13:14:27 -08:00
parent 713241a94f
commit 72bfe1c846

View file

@ -706,7 +706,11 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons
}
- (double)latency {
return [outputBuffer listDuration];
NSTimeInterval latency = 0.0;
if(_au) {
latency = [_au latency];
}
return [outputBuffer listDuration] + latency;
}
- (void)start {