コード例 #1
0
 private void ReleaseUnmanagedResources()
 {
     using (var handle = _handle.Lock())
     {
         if (handle.Value != IntPtr.Zero)
         {
             AudioPluginDissonanceNative.Dissonance_DestroyRnnoiseState(handle.Value);
             handle.Value = IntPtr.Zero;
         }
     }
 }
コード例 #2
0
            public void Reset()
            {
                using (var handle = _handle.Lock())
                {
                    Log.Debug("Resetting RnnoisePreprocessor");

                    if (handle.Value != IntPtr.Zero)
                    {
                        //Destroy it
                        AudioPluginDissonanceNative.Dissonance_DestroyRnnoiseState(handle.Value);
                        handle.Value = IntPtr.Zero;
                    }

                    //Create a new one
                    handle.Value = AudioPluginDissonanceNative.Dissonance_CreateRnnoiseState();
                }
            }