Example #1
0
        void Dispose(bool isDisposing)
        {
            // Only for illustration purposes, simply disposing of _patch and _pd is enough as with any sane implementation of IDisposable.
            // Unsubscribe from all message receivers
            _pd.Messaging.Unbind(CursorReceiver);
            _pd.Messaging.Float -= Pd_Float;
            // Stop audio
            _pd.Stop();

            // Dispose of the IDisposables in correct order
            _patch.Dispose();
            _pd.Dispose();
        }
Example #2
0
 /// <summary>
 /// Function to change state of process audio.
 /// </summary>
 /// <param name="state">True to put available audio, false to disable audio. Default is true.</param>
 public void Compute(bool state = true)
 {
     if (state)
     {
         PD.Start();
         pdDsp = true;
     }
     else
     {
         PD.Stop();
         pdDsp = false;
     }
 }
Example #3
0
 public virtual void StopTest()
 {
     _pd.Start();
     _pd.Stop();
     Assert.IsFalse(_pd.IsComputing);
 }