Formatting

This commit is contained in:
Alex Harker
2019-08-28 10:46:08 +01:00
parent 26b3f1a3bd
commit 2fefec6a33
2 changed files with 13 additions and 19 deletions
+12 -16
View File
@@ -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();
}
+1 -3
View File
@@ -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));
}