@@ -27,10 +27,10 @@ PowerJuicePlugin::PowerJuicePlugin()
2727 : Plugin(paramCount, 1 , 0 ) // 1 program, 0 states
2828{
2929 // set default values
30- d_setProgram (0 );
30+ loadProgram (0 );
3131
3232 // reset
33- d_deactivate ();
33+ deactivate ();
3434}
3535
3636PowerJuicePlugin::~PowerJuicePlugin ()
@@ -42,12 +42,12 @@ PowerJuicePlugin::~PowerJuicePlugin()
4242// -----------------------------------------------------------------------
4343// Init
4444
45- void PowerJuicePlugin::d_initParameter (uint32_t index, Parameter& parameter)
45+ void PowerJuicePlugin::initParameter (uint32_t index, Parameter& parameter)
4646{
4747 switch (index)
4848 {
4949 case paramAttack:
50- parameter.hints = PARAMETER_IS_AUTOMABLE ;
50+ parameter.hints = kParameterIsAutomable ;
5151 parameter.name = " Attack" ;
5252 parameter.symbol = " att" ;
5353 parameter.unit = " ms" ;
@@ -56,7 +56,7 @@ void PowerJuicePlugin::d_initParameter(uint32_t index, Parameter& parameter)
5656 parameter.ranges .max = 1000 .0f ;
5757 break ;
5858 case paramRelease:
59- parameter.hints = PARAMETER_IS_AUTOMABLE ;
59+ parameter.hints = kParameterIsAutomable ;
6060 parameter.name = " Release" ;
6161 parameter.symbol = " rel" ;
6262 parameter.unit = " ms" ;
@@ -65,7 +65,7 @@ void PowerJuicePlugin::d_initParameter(uint32_t index, Parameter& parameter)
6565 parameter.ranges .max = 1000 .0f ;
6666 break ;
6767 case paramThreshold:
68- parameter.hints = PARAMETER_IS_AUTOMABLE ;
68+ parameter.hints = kParameterIsAutomable ;
6969 parameter.name = " Threshold" ;
7070 parameter.symbol = " thr" ;
7171 parameter.unit = " dB" ;
@@ -74,7 +74,7 @@ void PowerJuicePlugin::d_initParameter(uint32_t index, Parameter& parameter)
7474 parameter.ranges .max = 0 .0f ;
7575 break ;
7676 case paramRatio:
77- parameter.hints = PARAMETER_IS_AUTOMABLE ;
77+ parameter.hints = kParameterIsAutomable ;
7878 parameter.name = " Ratio" ;
7979 parameter.symbol = " rat" ;
8080 parameter.unit = " " ;
@@ -83,7 +83,7 @@ void PowerJuicePlugin::d_initParameter(uint32_t index, Parameter& parameter)
8383 parameter.ranges .max = 10 .0f ;
8484 break ;
8585 case paramMakeup:
86- parameter.hints = PARAMETER_IS_AUTOMABLE ;
86+ parameter.hints = kParameterIsAutomable ;
8787 parameter.name = " Make-Up" ;
8888 parameter.symbol = " mak" ;
8989 parameter.unit = " " ;
@@ -92,7 +92,7 @@ void PowerJuicePlugin::d_initParameter(uint32_t index, Parameter& parameter)
9292 parameter.ranges .max = 20 .0f ;
9393 break ;
9494 case paramMix:
95- parameter.hints = PARAMETER_IS_AUTOMABLE ;
95+ parameter.hints = kParameterIsAutomable ;
9696 parameter.name = " Mix" ;
9797 parameter.symbol = " Mix" ;
9898 parameter.unit = " " ;
@@ -104,7 +104,7 @@ void PowerJuicePlugin::d_initParameter(uint32_t index, Parameter& parameter)
104104 }
105105}
106106
107- void PowerJuicePlugin::d_initProgramName (uint32_t index, d_string & programName)
107+ void PowerJuicePlugin::initProgramName (uint32_t index, String & programName)
108108{
109109 if (index != 0 )
110110 return ;
@@ -115,7 +115,7 @@ void PowerJuicePlugin::d_initProgramName(uint32_t index, d_string& programName)
115115// -----------------------------------------------------------------------
116116// Internal data
117117
118- float PowerJuicePlugin::d_getParameterValue (uint32_t index) const
118+ float PowerJuicePlugin::getParameterValue (uint32_t index) const
119119{
120120 switch (index)
121121 {
@@ -136,17 +136,17 @@ float PowerJuicePlugin::d_getParameterValue(uint32_t index) const
136136 }
137137}
138138
139- void PowerJuicePlugin::d_setParameterValue (uint32_t index, float value)
139+ void PowerJuicePlugin::setParameterValue (uint32_t index, float value)
140140{
141141 switch (index)
142142 {
143143 case paramAttack:
144144 attack = value;
145- attackSamples = d_getSampleRate ()*(attack/1000 .0f );
145+ attackSamples = getSampleRate ()*(attack/1000 .0f );
146146 break ;
147147 case paramRelease:
148148 release = value;
149- releaseSamples = d_getSampleRate ()*(release/1000 .0f );
149+ releaseSamples = getSampleRate ()*(release/1000 .0f );
150150 break ;
151151 case paramThreshold:
152152 threshold = value;
@@ -164,7 +164,7 @@ void PowerJuicePlugin::d_setParameterValue(uint32_t index, float value)
164164 }
165165}
166166
167- void PowerJuicePlugin::d_setProgram (uint32_t index)
167+ void PowerJuicePlugin::loadProgram (uint32_t index)
168168{
169169 if (index != 0 )
170170 return ;
@@ -178,8 +178,8 @@ void PowerJuicePlugin::d_setProgram(uint32_t index)
178178 mix = 1 .0f ;
179179
180180 makeupFloat = fromDB (makeup);
181- attackSamples = d_getSampleRate ()*(attack/1000 .0f );
182- releaseSamples = d_getSampleRate ()*(release/1000 .0f );
181+ attackSamples = getSampleRate ()*(attack/1000 .0f );
182+ releaseSamples = getSampleRate ()*(release/1000 .0f );
183183
184184
185185
@@ -207,13 +207,13 @@ void PowerJuicePlugin::d_setProgram(uint32_t index)
207207 repaintSkip = 0 ;
208208
209209
210- kFloatRMSStackCount = 400 .0f /44100 .0f *d_getSampleRate ();
210+ kFloatRMSStackCount = 400 .0f /44100 .0f *getSampleRate ();
211211 RMSStack.data = (float *) calloc (kFloatRMSStackCount , sizeof (float ));
212212
213- kFloatLookaheadStackCount = 800 .0f /44100 .0f *d_getSampleRate ();
213+ kFloatLookaheadStackCount = 800 .0f /44100 .0f *getSampleRate ();
214214 lookaheadStack.data = (float *) calloc (kFloatLookaheadStackCount , sizeof (float ));
215215
216- refreshSkip= 300 .0f /44100 .0f *d_getSampleRate ();
216+ refreshSkip= 300 .0f /44100 .0f *getSampleRate ();
217217
218218 std::memset (rms.data , 0 , sizeof (float )*kFloatStackCount );
219219 std::memset (gainReduction.data , 0 , sizeof (float )*kFloatStackCount );
@@ -225,7 +225,7 @@ void PowerJuicePlugin::d_setProgram(uint32_t index)
225225 for (int j=0 ; j < kFloatStackCount ; ++j)
226226 history.gainReduction [j] = h +y;
227227
228- d_activate ();
228+ activate ();
229229
230230}
231231
@@ -248,16 +248,16 @@ float PowerJuicePlugin::getGainReductionHistory(int n) {
248248// -----------------------------------------------------------------------
249249// Process
250250
251- void PowerJuicePlugin::d_activate ()
251+ void PowerJuicePlugin::activate ()
252252{
253253}
254254
255- void PowerJuicePlugin::d_deactivate ()
255+ void PowerJuicePlugin::deactivate ()
256256{
257257 // all values to zero
258258}
259259
260- void PowerJuicePlugin::d_run (const float ** inputs, float ** outputs, uint32_t frames)
260+ void PowerJuicePlugin::run (const float ** inputs, float ** outputs, uint32_t frames)
261261{
262262 const float * in = inputs[0 ];
263263 float * out = outputs[0 ];
0 commit comments