/// Step 4 (2.2) of N /// <seealso cref="ProcessToMixer(VstPlugin,VstAudioBuffer[])"/> private float[] ProcessReplace(int blockSize) { //lock (this) { if (blockSize != BlockSize) { BlockSize = blockSize; // phase doesn't match? actualOutput = new float[WaveFormat.Channels * blockSize]; } try { if (mod == null) { mod = IOModule.Create(blockSize, module_instrument, module_effect); } mod.Reset(blockSize, module_instrument, module_effect); mod.GeneralProcess(module_instrument, module_effect); actualBuffer = module_effect == null? mod.Inputs.Outputs.ToArray() : mod.Outputs.Outputs.ToArray(); } catch (Exception ex) { Parent.Stop(); System.Windows.Forms.MessageBox.Show(ex.ToString()); } ProcessToMixer(module_effect ?? module_instrument, actualBuffer); } return(actualOutput); }
static public IOModule Create(int blockSize, VstPlugin vstI, VstPlugin vstO) { var module = new IOModule(); return(module.Reset(blockSize, vstI, vstO)); }
public static IOModule Create(int blockSize, VstPlugin vstI, VstPlugin vstO) { var module = new IOModule(); return module.Reset(blockSize,vstI,vstO); }