예제 #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();
        }
예제 #2
0
파일: PdManager.cs 프로젝트: wjkbfq/HRIRu
 /// <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;
     }
 }
예제 #3
0
 public virtual void StopTest()
 {
     _pd.Start();
     _pd.Stop();
     Assert.IsFalse(_pd.IsComputing);
 }