mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AudioProcessLoadMeasurer: Fix a data race
This commit is contained in:
parent
e9417c645b
commit
27abc89396
2 changed files with 30 additions and 18 deletions
|
|
@ -96,8 +96,13 @@ public:
|
|||
void registerRenderTime (double millisecondsTaken, int numSamples);
|
||||
|
||||
private:
|
||||
double cpuUsageProportion = 0, timeToCpuScale = 0, msPerSample = 0;
|
||||
int xruns = 0, samplesPerBlock = 0;
|
||||
void registerRenderTimeLocked (double, int);
|
||||
|
||||
SpinLock mutex;
|
||||
int samplesPerBlock = 0;
|
||||
double msPerSample = 0;
|
||||
std::atomic<double> cpuUsageProportion { 0 };
|
||||
std::atomic<int> xruns { 0 };
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue