Routing setting active IO using cast
This commit is contained in:
@@ -15,7 +15,7 @@ FrameLib_Dispatch::Select::Select(FrameLib_Context context, FrameLib_Parameters:
|
||||
mParameters.setErrorReportingEnabled(false);
|
||||
mParameters.set(serialisedParameters);
|
||||
|
||||
mActiveIn = floor(mParameters.getValue(kActiveIn) - 1.0);
|
||||
mActiveIn = truncToInt(mParameters.getValue(kActiveIn) - 1.0);
|
||||
|
||||
for (long i = 0; i < mNumIns; i++)
|
||||
setInputMode(i, false, i == mActiveIn, true, kFrameAny);
|
||||
@@ -30,7 +30,7 @@ void FrameLib_Dispatch::Select::update()
|
||||
{
|
||||
if (mParameters.changed(kActiveIn))
|
||||
{
|
||||
mActiveIn = floor(mParameters.getValue(kActiveIn) - 1.0);
|
||||
mActiveIn = truncToInt(mParameters.getValue(kActiveIn) - 1.0);
|
||||
|
||||
for (long i = 0; i < mNumIns; i++)
|
||||
updateTrigger(i, i == mActiveIn);
|
||||
|
||||
@@ -12,7 +12,7 @@ FrameLib_Route::Valve::Valve(FrameLib_Context context, FrameLib_Parameters::Seri
|
||||
mParameters.setErrorReportingEnabled(false);
|
||||
mParameters.set(serialisedParameters);
|
||||
|
||||
mActiveValve = floor(mParameters.getValue(kActiveValve) - 1.0);
|
||||
mActiveValve = truncToInt(mParameters.getValue(kActiveValve) - 1.0);
|
||||
|
||||
setInputMode(0, false, mValveNumber == mActiveValve, true, kFrameAny);
|
||||
setOutputType(0, kFrameAny);
|
||||
@@ -24,7 +24,7 @@ FrameLib_Route::Valve::Valve(FrameLib_Context context, FrameLib_Parameters::Seri
|
||||
|
||||
void FrameLib_Route::Valve::update()
|
||||
{
|
||||
mActiveValve = floor(mParameters.getValue(kActiveValve) - 1.0);
|
||||
mActiveValve = truncToInt(mParameters.getValue(kActiveValve) - 1.0);
|
||||
updateTrigger(0, mValveNumber == mActiveValve);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ FrameLib_Select::FrameLib_Select(FrameLib_Context context, FrameLib_Parameters::
|
||||
mParameters.set(serialisedParameters);
|
||||
|
||||
mNumIns = mParameters.getInt(kNumIns);
|
||||
mActiveIn = floor(mParameters.getValue(kActiveIn) - 1.0);
|
||||
mActiveIn = truncToInt(mParameters.getValue(kActiveIn) - 1.0);
|
||||
|
||||
setIO(mNumIns, 1);
|
||||
|
||||
@@ -62,7 +62,7 @@ void FrameLib_Select::update()
|
||||
{
|
||||
if (mParameters.changed(kActiveIn))
|
||||
{
|
||||
mActiveIn = floor(mParameters.getValue(kActiveIn) - 1.0);
|
||||
mActiveIn = truncToInt(mParameters.getValue(kActiveIn) - 1.0);
|
||||
|
||||
for (long i = 0; i < mNumIns; i++)
|
||||
updateTrigger(i, i == mActiveIn);
|
||||
|
||||
Reference in New Issue
Block a user