File 01-juce-5.4.7.patch of Package Bad-Circuit-Modelling
diff -X excpat -ur a/CMAging/Plugin/Source/PluginProcessor.h b/CMAging/Plugin/Source/PluginProcessor.h
--- a/CMAging/Plugin/Source/PluginProcessor.h 2020-04-28 16:48:18.323649018 +1000
+++ b/CMAging/Plugin/Source/PluginProcessor.h 2020-04-27 18:41:40.443299429 +1000
@@ -64,11 +64,11 @@
void updateParams();
private:
- float* freqParam;
- float* qParam;
- float* ageParam;
- float* tempParam;
- float* capFailParam;
+ std::atomic<float>* freqParam;
+ std::atomic<float>* qParam;
+ std::atomic<float>* ageParam;
+ std::atomic<float>* tempParam;
+ std::atomic<float>* capFailParam;
LPF lpf[2];
LPFCircuit lpfCircuit[2];
diff -X excpat -ur a/CMTemperature/Plugin/Source/PluginProcessor.h b/CMTemperature/Plugin/Source/PluginProcessor.h
--- a/CMTemperature/Plugin/Source/PluginProcessor.h 2020-04-28 16:48:18.327649018 +1000
+++ b/CMTemperature/Plugin/Source/PluginProcessor.h 2020-04-27 18:51:31.194603445 +1000
@@ -63,9 +63,9 @@
void updateParams();
private:
- float* freqParam;
- float* qParam;
- float* tempParam;
+ std::atomic<float>* freqParam;
+ std::atomic<float>* qParam;
+ std::atomic<float>* tempParam;
NoisyLPF lpf[2];
diff -X excpat -ur a/CMTolerance/Plugin/Source/PluginProcessor.h b/CMTolerance/Plugin/Source/PluginProcessor.h
--- a/CMTolerance/Plugin/Source/PluginProcessor.h 2020-04-28 16:48:18.327649018 +1000
+++ b/CMTolerance/Plugin/Source/PluginProcessor.h 2020-04-27 18:49:16.298775815 +1000
@@ -64,9 +64,9 @@
void updateParams();
private:
- float* freqParam = nullptr;
- float* qParam = nullptr;
- float* tolParam = nullptr;
+ std::atomic<float>* freqParam = nullptr;
+ std::atomic<float>* qParam = nullptr;
+ std::atomic<float>* tolParam = nullptr;
LPF lpf [2];
LPFCircuit lpfCircuit[2];
diff -X excpat -ur a/DiodeClipper/Plugin/Source/PluginProcessor.cpp b/DiodeClipper/Plugin/Source/PluginProcessor.cpp
--- a/DiodeClipper/Plugin/Source/PluginProcessor.cpp 2020-04-28 16:48:18.327649018 +1000
+++ b/DiodeClipper/Plugin/Source/PluginProcessor.cpp 2020-04-27 18:48:02.486860599 +1000
@@ -145,10 +145,10 @@
for (int ch = 0; ch < 2; ++ch)
diodeClipper[ch].reset (sampleRate, (double) *freqParam);
- curGain = Decibels::decibelsToGain (*gainDBParam);
+ curGain = Decibels::decibelsToGain (gainDBParam->load());
oldGain = curGain;
- curOutGain = Decibels::decibelsToGain (*outDBParam);
+ curOutGain = Decibels::decibelsToGain (outDBParam->load());
oldOutGain = curOutGain;
}
@@ -194,8 +194,8 @@
diodeClipper[ch].setCircuitElements (diodeCircuit[ch].getR(), diodeCircuit[ch].getC (rmsLevel[ch]), leakRPar);
}
- curGain = Decibels::decibelsToGain (*gainDBParam);
- curOutGain = Decibels::decibelsToGain (*outDBParam);
+ curGain = Decibels::decibelsToGain (gainDBParam->load());
+ curOutGain = Decibels::decibelsToGain (outDBParam->load());
}
void DiodeClipperAudioProcessor::processBlock (AudioBuffer<float>& buffer, MidiBuffer& midiMessages)
diff -X excpat -ur a/DiodeClipper/Plugin/Source/PluginProcessor.h b/DiodeClipper/Plugin/Source/PluginProcessor.h
--- a/DiodeClipper/Plugin/Source/PluginProcessor.h 2020-04-28 16:48:18.327649018 +1000
+++ b/DiodeClipper/Plugin/Source/PluginProcessor.h 2020-04-27 18:44:59.019071337 +1000
@@ -67,16 +67,16 @@
private:
// general params
- float* freqParam = nullptr;
- float* gainDBParam = nullptr;
- float* outDBParam = nullptr;
+ std::atomic<float>* freqParam = nullptr;
+ std::atomic<float>* gainDBParam = nullptr;
+ std::atomic<float>* outDBParam = nullptr;
// components
- float* cTolParam;
- float* cAgeParam;
- float* cTempParam;
- float* cCapLeakParam;
- float* cCapFailParam;
+ std::atomic<float>* cTolParam;
+ std::atomic<float>* cAgeParam;
+ std::atomic<float>* cTempParam;
+ std::atomic<float>* cCapLeakParam;
+ std::atomic<float>* cCapFailParam;
float curGain = 1.0f;
float oldGain = 1.0f;
diff -X excpat -ur a/OpAmp/Plugin/Source/PluginProcessor.h b/OpAmp/Plugin/Source/PluginProcessor.h
--- a/OpAmp/Plugin/Source/PluginProcessor.h 2020-04-28 16:48:18.331649018 +1000
+++ b/OpAmp/Plugin/Source/PluginProcessor.h 2020-04-27 18:37:58.411554465 +1000
@@ -63,10 +63,10 @@
void updateParams();
private:
- float* freqParam;
- float* qParam;
- float* tempParam;
- float* ageParam;
+ std::atomic<float>* freqParam;
+ std::atomic<float>* qParam;
+ std::atomic<float>* tempParam;
+ std::atomic<float>* ageParam;
OpAmpLPF lpf[2];
diff -X excpat -ur a/SallenKeyLPF/Plugin/Source/PluginProcessor.h b/SallenKeyLPF/Plugin/Source/PluginProcessor.h
--- a/SallenKeyLPF/Plugin/Source/PluginProcessor.h 2020-04-28 16:48:18.335649018 +1000
+++ b/SallenKeyLPF/Plugin/Source/PluginProcessor.h 2020-04-27 18:53:46.090421267 +1000
@@ -65,18 +65,18 @@
private:
// circuit
- float* freqParam;
- float* qParam;
+ std::atomic<float>* freqParam;
+ std::atomic<float>* qParam;
// components
- float* cTolParam;
- float* cAgeParam;
- float* cTempParam;
- float* cCapFailParam;
+ std::atomic<float>* cTolParam;
+ std::atomic<float>* cAgeParam;
+ std::atomic<float>* cTempParam;
+ std::atomic<float>* cCapFailParam;
// op amp
- float* oaTempParam;
- float* oaAgeParam;
+ std::atomic<float>* oaTempParam;
+ std::atomic<float>* oaAgeParam;
OpAmpLPF lpf[2];
LPFCircuit circuit[2];