cadencii.VSTiDriverBase.close C# (CSharp) Method

close() public method

public close ( ) : void
return void
        public virtual void close()
        {
            lock ( mSyncRoot ) {
#if TEST
                sout.println( "vstidrv#close" );
#endif
                if ( ui != null && !ui.IsDisposed ) {
                    ui.Close();
                }
                try {
                    sout.println( "vstidrv#close; (aEffect==null)=" + (aEffect == null) );
                    if ( aEffect != null ) {
                        aEffect.Dispatch( AEffectOpcodes.effClose, 0, 0, IntPtr.Zero, 0.0f );
                    }
                    sout.println( "vstidrv#close; dllHandle=" + dllHandle );
                    if ( dllHandle != IntPtr.Zero ) {
                        win32.FreeLibrary( dllHandle );
                    }
                    aEffect = null;
                    dllHandle = IntPtr.Zero;
                    mainDelegate = null;
                    audioMaster = null;
                } catch ( Exception ex ) {
                    serr.println( "vstidrv#close; ex=" + ex );
                }
                releaseBuffer();
            }
        }