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
d32f77d02f
commit
542158415f
1 changed files with 7 additions and 2 deletions
|
@ -101,8 +101,13 @@ static VisualizationController *_sharedController = nil;
|
|||
}
|
||||
|
||||
- (void)postLatency:(double)latency {
|
||||
ignoreLatency = (latency >= 45.0) || (latency < 0.0);
|
||||
self->latency = latency;
|
||||
if((latency >= 45.0) || (latency < 0.0)) [[clang::unlikely]] {
|
||||
ignoreLatency = YES;
|
||||
self->latency = latency;
|
||||
} else {
|
||||
self->latency = latency;
|
||||
ignoreLatency = NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (double)readSampleRate {
|
||||
|
|
Loading…
Reference in a new issue