Exemplo n.º 1
0
/*Control method to mute sound using WinMM header */
void ControlSound ( bool flagMute ) {
  if ( MUTE_CHECK_FLAG ) {
      Mixer mixer;
      if ( mixer.init() && mixer.GetMuteControl() ) {
          if ( flagMute )
            mixer.SetMute ( true );
          else
            mixer.SetMute ( false );
        }
      mixer.close();
    }
}
Exemplo n.º 2
0
/*
 * Clean up and free all ressources of all found Mixers, which were found in the initMixer() call
 */
void MixerToolBox::deinitMixer()
{
   //kdDebug(67100) << "IN MixerToolBox::deinitMixer()"<<endl;
   Mixer *mixer;
   while ( (mixer=Mixer::mixers().first()) != 0)
   {
      //kdDebug(67100) << "MixerToolBox::deinitMixer() Remove Mixer" << endl;
      mixer->close();
      Mixer::mixers().remove(mixer);
      delete mixer;
   }
   // kdDebug(67100) << "OUT MixerToolBox::deinitMixer()"<<endl;
}
Exemplo n.º 3
0
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;
}