Пример #1
0
        public override void Dispose()
        {
            FDoProcess = false;

            //close and dispose vst
            if (PluginContext != null && PluginContext.PluginCommandStub != null)
            {
                PluginContext.PluginCommandStub.StopProcess();
                PluginContext.PluginCommandStub.MainsChanged(false);
                PluginContext.Dispose();
            }

            if (FInputMgr != null)
            {
                FInputMgr.Dispose();
                FOutputMgr.Dispose();
            }

            if (InfoForm != null)
            {
                InfoForm.ParameterCheck -= InfoForm_ParameterCheck;
                InfoForm.Dispose();
            }


            base.Dispose();
        }
Пример #2
0
 internal void Dispose()
 {
     if (PluginContext != null)
     {
         PluginContext.Dispose();
     }
 }
 internal void Dispose()
 {
     edit.Close();
     if (pluginContext != null)
     {
         pluginContext.Dispose();
     }
 }
Пример #4
0
 private void ReleasePlugin()
 {
     try
     {
         _plugin.Dispose();
     }
     catch (NullReferenceException)
     {
         //Do Nothing
     }
 }
Пример #5
0
        public void Finish()
        {
            if (_plugin != null)
            {
                _audioPlayer.Stop();
                _audioPlayer.Dispose();

                _plugin.PluginCommandStub.EditorClose();
                _plugin.Dispose();
                _plugin = null;
            }
        }
Пример #6
0
        private void DeleteBtn_Click(object sender, EventArgs e)
        {
            VstPluginContext ctx = SelectedPluginContext;

            if (ctx != null)
            {
                ctx.Dispose();

                _plugins.Remove(ctx);

                FillPluginList();
            }
        }
Пример #7
0
        void CreateContext(string path)
        {
            if (context != null)
            {
                try{ context.PluginCommandStub.Close(); } catch {}
                try{ context.Dispose(); } catch {}
                try{ context = null; } catch {}
            }
            context = VstPluginContext.Create(path, Host.VstHost);
            PluginCommandStub.SetSampleRate(Convert.ToSingle(Host.VstPlayer.Settings.Rate));
            Set("PluginPath", PluginPath = path);
            Set("HostCmdStub", Host.VstHost);
//			if (context!=null) Open();
        }
Пример #8
0
        private bool disposedValue = false; // 重複する呼び出しを検出するには

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    // TODO: マネージ状態を破棄します (マネージ オブジェクト)。
                }

                // TODO: アンマネージ リソース (アンマネージ オブジェクト) を解放し、下のファイナライザーをオーバーライドします。
                // TODO: 大きなフィールドを null に設定します。
                lock (InstrumentBase.VstPluginContextLockObject)
                {
                    if (f_Context != null)
                    {
                        f_Context.Dispose();
                        f_Context = null;
                    }
                }

                disposedValue = true;
            }
        }