コード例 #1
0
ファイル: glue.cpp プロジェクト: muggabatscher/giada
void glue_resetToInitState(bool resetGui) {
	G_Mixer.running = false;
	for (unsigned i=0; i<MAX_NUM_CHAN; i++)
		mh_freeChan(i);
	recorder::init();
	G_Patch.setDefault();
	G_Mixer.init();
#ifdef WITH_VST
	G_PluginHost.freeAllStacks();
#endif
	if (resetGui)	gu_update_controls();
}
コード例 #2
0
ファイル: gd_mainWindow.cpp プロジェクト: nesbit/giada
void gdMainWindow::__cb_endprogram() {

	if (!gdConfirmWin("Warning", "Quit Giada: are you sure?"))
		return;

	G_quit = true;

	/* close any open subwindow, especially before cleaning PluginHost to
	 * avoid mess */

	puts("GUI closing...");
	gu_closeAllSubwindows();

	/* write configuration file */

	if (!G_Conf.write())
		puts("Error while saving configuration file!");
	else
		puts("Configuration saved");

	puts("Mixer cleanup...");

	/* if G_audio_status we close the kernelAudio FIRST, THEN the mixer.
	 * The opposite could cause random segfaults (even now with RtAudio?). */

	if (G_audio_status) {
		kernelAudio::closeDevice();
		G_Mixer.close();
	}

	puts("Recorder cleanup...");
	recorder::clearAll();

#ifdef WITH_VST
	puts("Plugin Host cleanup...");
	G_PluginHost.freeAllStacks();
#endif

	puts("Giada "VERSIONE" closed.");
	hide();

	delete this;
}