a guest May 19th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- void AGain::subProcess( int bufferOffset, int sampleFrames )
- // get parameter value.
- float val = voltVal;
- // get pointers to in/output buffers.
- float* input1 = bufferOffset + X.getBuffer();
- float* input2 = bufferOffset + Y.getBuffer();
- float* output1 = bufferOffset + result.getBuffer();
- float threshLow, threshHi = 0;
- while( --sampleFrames >= 0 )
- threshLow = *input1 - threshold;
- threshHi = *input1 + threshold;
- if((*input2 >= threshLow) && (*input2 <= threshHi))
- *output1 = val;
RAW Paste Data