@@ -144,10 +144,10 @@ void DfxPlugin::DoTokenIdle()
144
144
// -----------------------------------------------------------------------------
145
145
void DfxPlugin::AddParametersToList ()
146
146
{
147
- constexpr OSType masterBypassFourCharID = ' bypa ' ;
147
+ constexpr OSType globalBypassFourCharID = FOURCC ( ' b ' , ' y ' , ' p ' , ' a ' ) ;
148
148
149
- AddControl (new CPluginControl_OnOff (masterBypassFourCharID , " Master Bypass\n M Bypass\n MByp \n Byp" , false , true ));
150
- DefineMasterBypassControlIndex (dfx::kParameterID_RTASMasterBypass );
149
+ AddControl (new CPluginControl_OnOff (globalBypassFourCharID , " Global Bypass\n G Bypass\n GByp \n Byp" , false , true ));
150
+ DefineMasterBypassControlIndex (dfx::kParameterID_RTASGlobalBypass );
151
151
152
152
OSType paramFourCharID = 0 ;
153
153
for (long i = 0 ; i < getnumparameters (); i++)
@@ -162,9 +162,11 @@ void DfxPlugin::AddParametersToList()
162
162
auto const paramName = getparametername (i);
163
163
164
164
paramFourCharID = DFX_IterateAlphaNumericFourCharCode (paramFourCharID);
165
- // make sure to skip over the ID already used for master bypass
166
- if (paramFourCharID == masterBypassFourCharID)
165
+ // make sure to skip over the ID already used for global bypass
166
+ if (paramFourCharID == globalBypassFourCharID)
167
+ {
167
168
paramFourCharID = DFX_IterateAlphaNumericFourCharCode (paramFourCharID);
169
+ }
168
170
bool const paramAutomatable = (getparameterattributes (i) & (DfxParam::kAttribute_Hidden | DfxParam::kAttribute_Unused )) ? false : true ;
169
171
constexpr int numCurvedSteps = 1000 ;
170
172
double const stepSize_default = (paramMax_f - paramMin_f) / (double )numCurvedSteps;
@@ -262,7 +264,7 @@ ComponentResult DfxPlugin::GetControlNameOfLength(long inParameterIndex, char *
262
264
if (inNameLength <= dfx::kParameterShortNameMax_RTAS)
263
265
{
264
266
char * shortNameString = NULL;
265
- if (inParameterIndex == dfx::kParameterID_RTASMasterBypass )
267
+ if (inParameterIndex == dfx::kParameterID_RTASGlobalBypass )
266
268
shortNameString = "Bypass"; // any shortened version of this is fine
267
269
else
268
270
shortNameString = GetParameterShortName( dfx::ParameterID_FromRTAS(inParameterIndex) );
@@ -306,9 +308,9 @@ ComponentResult DfxPlugin::GetValueString(long inParameterIndex, long inValue, S
306
308
// -----------------------------------------------------------------------------
307
309
void DfxPlugin::UpdateControlValueInAlgorithm (long inParameterIndex)
308
310
{
309
- if (inParameterIndex == dfx::kParameterID_RTASMasterBypass )
311
+ if (inParameterIndex == dfx::kParameterID_RTASGlobalBypass )
310
312
{
311
- mMasterBypass_rtas = dynamic_cast <CPluginControl_Discrete*>(GetControl (inParameterIndex))->GetDiscrete ();
313
+ mGlobalBypass_rtas = dynamic_cast <CPluginControl_Discrete*>(GetControl (inParameterIndex))->GetDiscrete ();
312
314
return ;
313
315
}
314
316
@@ -363,7 +365,7 @@ ComponentResult DfxPlugin::IsControlAutomatable(long inControlIndex, short * out
363
365
return paramErr;
364
366
365
367
// XXX test this first, since dfx::ParameterID_FromRTAS() makes it an invalid ID
366
- if (inControlIndex == dfx::kParameterID_RTASMasterBypass )
368
+ if (inControlIndex == dfx::kParameterID_RTASGlobalBypass )
367
369
{
368
370
*outItIs = 1 ;
369
371
return noErr ;
@@ -439,7 +441,7 @@ ComponentResult DfxPlugin::SetChunk(OSType inChunkID, SFicPlugInChunk * chunk)
439
441
440
442
#ifdef TARGET_API_AUDIOSUITE
441
443
// -----------------------------------------------------------------------------
442
- UInt32 DfxPlugin::ProcessAudio (bool inIsMasterBypassed )
444
+ UInt32 DfxPlugin::ProcessAudio (bool inIsGlobalBypassed )
443
445
{
444
446
if (!IsAS ())
445
447
{
@@ -478,7 +480,7 @@ UInt32 DfxPlugin::ProcessAudio(bool inIsMasterBypassed)
478
480
mInputAudioStreams_as [ch] = mZeroAudioBuffer .data ();
479
481
}
480
482
481
- if (inIsMasterBypassed )
483
+ if (inIsGlobalBypassed )
482
484
{
483
485
for (long i = 0 ; i < totalInputSamples; i++)
484
486
mOutputAudioStreams_as [ch][i] = mInputAudioStreams_as [ch][i];
@@ -490,8 +492,10 @@ UInt32 DfxPlugin::ProcessAudio(bool inIsMasterBypassed)
490
492
}
491
493
}
492
494
493
- if (!inIsMasterBypassed)
495
+ if (!inIsGlobalBypassed)
496
+ {
494
497
RenderAudio (mInputAudioStreams_as .data (), mOutputAudioStreams_as .data (), totalInputSamples);
498
+ }
495
499
496
500
// Get the current number of samples analyzed and pass this info
497
501
// back to the DAE application so it knows how much we've processed.
@@ -539,7 +543,7 @@ void DfxPlugin::RenderAudio(float ** inAudioStreams, float ** outAudioStreams, l
539
543
{
540
544
continue ;
541
545
}
542
- if (mMasterBypass_rtas )
546
+ if (mGlobalBypass_rtas )
543
547
{
544
548
SInt32 const inputChannelIndex = (GetNumInputs () < GetNumOutputs ()) ? (GetNumInputs () - 1 ) : channel;
545
549
std::copy_n (mInputAudioStreams [inputChannelIndex], dfx::math::ToIndex (inNumFramesToProcess), outAudioStreams[channel]);
@@ -568,7 +572,7 @@ void DfxPlugin::RenderAudio(float ** inAudioStreams, float ** outAudioStreams, l
568
572
}
569
573
}
570
574
#if !TARGET_PLUGIN_USES_DSPCORE
571
- if (!mMasterBypass_rtas )
575
+ if (!mGlobalBypass_rtas )
572
576
{
573
577
processaudio (const_cast <float const * const *>(mInputAudioStreams .data ()), const_cast <float * const *>(outAudioStreams), (unsigned )inNumFramesToProcess);
574
578
}
@@ -781,11 +785,15 @@ void DfxPlugin::ProcessDoIdle()
781
785
// -----------------------------------------------------------------------------
782
786
ComponentResult DfxPlugin::SetControlHighliteInfo (long inControlIndex, short inIsHighlighted, short inColor)
783
787
{
784
- if (inControlIndex == dfx::kParameterID_RTASMasterBypass )
788
+ if (inControlIndex == dfx::kParameterID_RTASGlobalBypass )
789
+ {
785
790
CProcess::SetControlHighliteInfo (inControlIndex, inIsHighlighted, inColor);
791
+ }
786
792
787
793
if (mCustomUI_p )
794
+ {
788
795
mCustomUI_p ->SetControlHighlight (inControlIndex, inIsHighlighted, inColor);
796
+ }
789
797
790
798
return noErr ;
791
799
}
0 commit comments