public static void Dispose(object obj) { Bass.BASS_ChannelStop(stream); Bass.BASS_StreamFree(stream); Bass.BASS_Stop(); //停止 Bass.BASS_Free(); //释放 GC.SuppressFinalize(obj); }
//Audio_Start public void Audio_Stop() { Bass.BASS_StreamFree(Audio_Stream); Bass.BASS_Free(); Audio_Stream = 0; timer1.Enabled = false; timer2.Enabled = false; }
/// <summary> /// Stops the player and removes it and its plugins from memory /// </summary> public void destroyPlayer() { foreach (int plg in plugin_dict.Values) { Bass.BASS_PluginFree(plg); } Bass.BASS_Free(); }
//关闭bass public void CloseBass() { _updateTimer.Tick -= new EventHandler(timerUpdate_Tick); // close bass Bass.BASS_Stop(); Bass.BASS_Free(); th.Abort(); }
public bool BassFree() { bool result = Bass.BASS_Free(); this.Initiallized = !result; return(result); }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { Bass.BASS_StreamFree(stream); Bass.BASS_Free(); UnregisterHotKey(this.Handle, 1); UnregisterHotKey(this.Handle, 2); UnregisterHotKey(this.Handle, 3); }
public void Dispose() { if (instance != null) { Bass.BASS_Free(); instance = null; } }
private void CloseBtn_Click(object sender, EventArgs e) { Bass.BASS_ChannelStop(hStream); Bass.BASS_Free(); IsPreviewEnabled = false; Quitting = true; Close(); }
public AudioService() { speechSynthesiser = new SpeechSynthesizer(); maryTtsPlayer = new SoundPlayerEx(); BassNet.Registration(BassRegistrationEmail, BassRegistrationKey); Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero); Application.Current.Exit += (sender, args) => Bass.BASS_Free(); }
// Form1_Load //BinaryWriter bw = new BinaryWriter (File.Open ("test.pcm", FileMode.Create)); private void Form1_FormClosed(object sender, FormClosedEventArgs e) { Bass.BASS_StreamFree(Audio_Stream); Bass.BASS_Free(); Parm_To_Tab(ListParam [iFnames]); Save_Parms_Xml(); //bw.Close (); }
/// <summary> /// Освобождает все ресурсы, используемые текущим экземпляром класса <see cref="SpectrumAnalyzer"/>. /// </summary> public void Dispose() { Stop(); Free(); BassWasapi.BASS_WASAPI_Free(); Bass.BASS_Free(); }
private void Dispose(bool disposing) { if (disposing) { Bass.BASS_Stop(); Bass.BASS_Free(); } _timer.Dispose(); }
//cleanup private static void Free() { BassWasapi.BASS_WASAPI_Free(); Bass.FreeMe(); if (!Bass.BASS_Free()) { throw new InvalidOperationException("BASS was not freed"); } }
private void CloseFile() { if (fileStream != 0) { Bass.BASS_StreamFree(fileStream); Bass.BASS_Free(); fileStream = 0; } }
public static long GetMIDILength(string str) { Bass.BASS_Init(0, 22050, BASSInit.BASS_DEVICE_NOSPEAKER, IntPtr.Zero); Int32 time = BassMidi.BASS_MIDI_StreamCreateFile(str, 0L, 0L, BASSFlag.BASS_STREAM_DECODE, 0); Bass.BASS_StreamFree(time); Bass.BASS_Free(); return(Bass.BASS_ChannelGetLength(time)); }
private void butClose_Click(object sender, RoutedEventArgs e) { this.Close(); if (backWorker.IsBusy) { backWorker.CancelAsync(); } Bass.BASS_Free(); }
private void Encoder_Closing(object sender, System.ComponentModel.CancelEventArgs e) { buttonStopRec.PerformClick(); Bass.BASS_StreamFree(monStream); // close bass Bass.BASS_Stop(); Bass.BASS_Free(); Bass.BASS_PluginFree(_wmaPlugIn); }
public void stop() { Bass.BASS_PluginFree(_wmaPlugIn); // close bass Bass.BASS_Stop(); Bass.BASS_Free(); Bass.BASS_PluginFree(_wmaPlugIn); }
public void IniciarEFinalizarBASS() { bool ok = Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero); Assert.IsTrue(ok); ok = Bass.BASS_Free(); Assert.IsTrue(ok); }
public static void Free() { Bass.BASS_Stop(); for (int i = 0; i < BassPluginsHandles.Count; i++) { Bass.BASS_PluginFree(BassPluginsHandles[i]); } Bass.BASS_Free(); }
protected void Dispose(bool bManagedDispose) { if (encoder != null) { encoder.Stop(); // finish encoder.Dispose(); encoder = null; } this.e出力デバイス = ESoundDeviceType.Unknown; // まず出力停止する(Dispose中にクラス内にアクセスされることを防ぐ) if (this.hMixer_DeviceOut != 0) { BassMix.BASS_Mixer_ChannelPause(this.hMixer_DeviceOut); Bass.BASS_StreamFree(this.hMixer_DeviceOut); this.hMixer_DeviceOut = 0; } if (this.hMixer_Record != 0) { BassMix.BASS_Mixer_ChannelPause(this.hMixer_Record); Bass.BASS_StreamFree(this.hMixer_Record); this.hMixer_Record = 0; } if (hMixer != 0) { BassMix.BASS_Mixer_ChannelPause(this.hMixer_Record); Bass.BASS_StreamFree(this.hMixer); } if (this.hMixer_Chips != null) { for (int i = 0; i <= (int)CSound.EInstType.Unknown; i++) { if (this.hMixer_Chips[i] != 0) { // Mixerにinputされるchannelsがfreeされると、Mixerへのinputも自動でremoveされる。 // 従い、ここでは、mixer本体をfreeするだけでよい BassMix.BASS_Mixer_ChannelPause(this.hMixer_Chips[i]); Bass.BASS_StreamFree(this.hMixer_Chips[i]); this.hMixer_Chips[i] = 0; } } } #if TEST_MultiThreadedMixer //BASSThreadedMixerLibraryWrapper.FreeBASSThreadedMixerLibrary(); #endif if (!this.bIsBASSFree) { BassWasapi.BASS_WASAPI_Free(); // システムタイマより先に呼び出すこと。(tWasapi処理() の中でシステムタイマを参照してるため) Bass.BASS_Free(); } if (bManagedDispose) { CCommon.tDispose(this.tmシステムタイマ); this.tmシステムタイマ = null; } }
private void NetRadio_Closing(object sender, System.ComponentModel.CancelEventArgs e) { Bass.BASS_PluginFree(_wmaPlugIn); // close bass Bass.BASS_Stop(); Bass.BASS_Free(); Bass.BASS_PluginFree(_wmaPlugIn); }
public void Dispose() { if (!IsSupported) { return; } Bass.BASS_Stop(); Bass.BASS_PluginFree(0); Bass.BASS_Free(); }
private void AudioAnalyzer_FormClosing(object sender, FormClosingEventArgs e) { if (!picWorking.Visible && !backgroundWorker1.IsBusy && !backgroundWorker2.IsBusy) { Bass.BASS_Free(); return; } MessageBox.Show("Please wait until the current process finishes", Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); e.Cancel = true; }
public override void Dispose() { Bass.BASS_Stop(); /* for (int i = 0; i < BassPluginsHandles.Count; i++) * Bass.BASS_PluginFree(BassPluginsHandles[i]);*/ Bass.BASS_Free(); _stream = 0; InitDefaultDevice = false; }
/// <summary> /// Free the associated resources /// </summary> public static void Free() { lock (Lockobject) { if (_initialized) { Bass.BASS_Free(); } } }
private void PlugIn_Closing(object sender, System.ComponentModel.CancelEventArgs e) { // unload all loaded add-ons... Bass.BASS_PluginFree(0); // close bass Bass.BASS_Stop(); Bass.BASS_Free(); BassNet.ShowAbout(this); }
private void ApplicationClose(object sender, FormClosedEventArgs e) { Bass.BASS_Stop(); for (int i = 0; i < model.BassPluginsHandles.Count; i++) { Bass.BASS_PluginFree(model.BassPluginsHandles[i]); } Bass.BASS_Free(); Application.Exit(); }
private void qtPlayer_FormClosing(object sender, FormClosingEventArgs e) { string path = Path.GetDirectoryName(Application.ExecutablePath); playlist1.TrackList.SaveCache(path + "\\" + "cache.qtPlaylist"); Bass.BASS_Free(); playlist1.TrackList.StopReadingTags(); string[] wlm = { "false" }; WLMStatus.SetNPM(WLMStatus.NPMType.Music, wlm, "{0}", false); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new mainForm()); // close bass Bass.BASS_Stop(); Bass.BASS_Free(); }