Merge branch 'master' into ir-manipulation
This commit is contained in:
@@ -17,9 +17,7 @@ FrameLib_Info::FrameLib_Info(FrameLib_Context context, FrameLib_Parameters::Seri
|
||||
mUnits = (Units) mParameters.getInt(kUnits);
|
||||
|
||||
setParameterInput(1);
|
||||
|
||||
assert(false == 0 && "False does not equal zero");
|
||||
|
||||
|
||||
if (mProxy)
|
||||
mProxy->update(mParameters.getString(kBuffer));
|
||||
}
|
||||
@@ -76,28 +74,27 @@ void FrameLib_Info::update()
|
||||
|
||||
void FrameLib_Info::process()
|
||||
{
|
||||
// declare vars
|
||||
double buf_samplingRate = 0.0;
|
||||
double bufferSamplingRate = 0.0;
|
||||
double conversionFactor = 1.0;
|
||||
unsigned long length = 0;
|
||||
unsigned long chans = 0;
|
||||
unsigned long size = 1; // output size is 1 - 1 value per outlet
|
||||
unsigned long length = 0;
|
||||
unsigned long chans = 0;
|
||||
unsigned long size = 1;
|
||||
|
||||
// allocate inputs and outputs
|
||||
// Allocate inputs and outputs
|
||||
|
||||
requestOutputSize(0, size);
|
||||
requestOutputSize(1, size);
|
||||
requestOutputSize(2, size);
|
||||
allocateOutputs();
|
||||
|
||||
|
||||
double *lengthOutput = getOutput(0, &size);
|
||||
double *smplRtOutput = getOutput(1, &size);
|
||||
double *nChansOutput = getOutput(2, &size);
|
||||
|
||||
// Get buffer
|
||||
|
||||
if (mProxy)
|
||||
mProxy->acquire(length, buf_samplingRate, chans);
|
||||
mProxy->acquire(length, bufferSamplingRate, chans);
|
||||
|
||||
switch (mUnits)
|
||||
{
|
||||
@@ -106,22 +103,21 @@ void FrameLib_Info::process()
|
||||
case kSamples: conversionFactor = 1.0; break;
|
||||
}
|
||||
|
||||
|
||||
if (length != 0 && size != 0)
|
||||
{
|
||||
lengthOutput[0] = length / conversionFactor;
|
||||
smplRtOutput[0] = buf_samplingRate;
|
||||
smplRtOutput[0] = bufferSamplingRate;
|
||||
nChansOutput[0] = chans;
|
||||
}
|
||||
|
||||
else // if not empty buffer produce results
|
||||
else
|
||||
{
|
||||
// Zero output if no buffer or memory
|
||||
|
||||
zeroVector(lengthOutput, size);
|
||||
zeroVector(smplRtOutput, size);
|
||||
zeroVector(nChansOutput, size);
|
||||
|
||||
}
|
||||
|
||||
if (mProxy)
|
||||
mProxy->release();
|
||||
}
|
||||
|
||||
@@ -31,9 +31,7 @@ FrameLib_Read::FrameLib_Read(FrameLib_Context context, FrameLib_Parameters::Seri
|
||||
mUnits = (Units) mParameters.getInt(kUnits);
|
||||
|
||||
setParameterInput(1);
|
||||
|
||||
assert(false == 0 && "False does not equal zero");
|
||||
|
||||
|
||||
if (mProxy)
|
||||
mProxy->update(mParameters.getString(kBuffer));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user