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:
parent
5cbebd0c43
commit
54264f721c
1 changed files with 7 additions and 2 deletions
|
@ -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]] {
|
||||||
|
ignoreLatency = YES;
|
||||||
self->latency = latency;
|
self->latency = latency;
|
||||||
|
} else {
|
||||||
|
self->latency = latency;
|
||||||
|
ignoreLatency = NO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (double)readSampleRate {
|
- (double)readSampleRate {
|
||||||
|
|
Loading…
Reference in a new issue