Visualization: Correct possible race condition
Some checks are pending
Check if Cog buildable / Build Universal Cog.app (push) Waiting to run
Some checks are pending
Check if Cog buildable / Build Universal Cog.app (push) Waiting to run
It's safer to ignore an out of range latency value before it's actually assigned, rather than letting it slip through before gating it with the control variable. So, assign the ignore latency state before assigning latency itself, since neither side is synchronization locked, because it used to just be one variable, which was fairly safe to leave unsynced, but now it's two. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
869bdd9a9b
commit
d32f77d02f
1 changed files with 1 additions and 1 deletions
|
@ -101,8 +101,8 @@ static VisualizationController *_sharedController = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)postLatency:(double)latency {
|
- (void)postLatency:(double)latency {
|
||||||
self->latency = latency;
|
|
||||||
ignoreLatency = (latency >= 45.0) || (latency < 0.0);
|
ignoreLatency = (latency >= 45.0) || (latency < 0.0);
|
||||||
|
self->latency = latency;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (double)readSampleRate {
|
- (double)readSampleRate {
|
||||||
|
|
Loading…
Reference in a new issue