Visualization: Even better race condition handling

Yes, this will do, much better. And I hope that unlikely attribute just
works like it should.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-07-01 05:03:42 -07:00
parent 5cbebd0c43
commit 54264f721c

View file

@ -101,8 +101,13 @@ static VisualizationController *_sharedController = nil;
} }
- (void)postLatency:(double)latency { - (void)postLatency:(double)latency {
ignoreLatency = (latency >= 45.0) || (latency < 0.0); if((latency >= 45.0) || (latency < 0.0)) [[clang::unlikely]] {
self->latency = latency; ignoreLatency = YES;
self->latency = latency;
} else {
self->latency = latency;
ignoreLatency = NO;
}
} }
- (double)readSampleRate { - (double)readSampleRate {