Exemple #1
0
 /// <summary>
 /// Overwrite in sub class to handle the disposal of instances,
 /// don't forget to call base.DisposeInstance(instance)
 /// </summary>
 /// <param name="instance">Instance signal instance to dipose</param>
 protected virtual void DisposeInstance(AudioSignal instance)
 {
     if (instance != null)
     {
         instance.Dispose();
     }
 }
        protected override void DisposeInstance(AudioSignal instance)
        {
            //remove pin relation
            foreach (var param in AudioSignal.GetParams(instance))
            {
                if (param.IsOutput)
                {
                    FOutputPinToParamMap.Remove(param);
                }
                else
                {
                    FInputPinToParamMap.Remove(param);
                }
            }

            base.DisposeInstance(instance);
        }
        protected override TSignal GetInstance(int i)
        {
            var instance = new TSignal();

            //assign pin relation
            foreach (var param in AudioSignal.GetParams(instance))
            {
                if (param.IsOutput)
                {
                    FOutputPinToParamMap[param] = FOutputPins[param.Name];
                }
                else
                {
                    FInputPinToParamMap[param] = FInputPins[param.Name];
                }
            }

            return(instance);
        }