コード例 #1
0
  void initJuceAudio(void){
    XmlElement *settings=propertiesfile->getXmlValue("audiodevicemanager");
    const String error (audioDeviceManager.initialise (0, /* number of input channels */
						       8, /* number of output channels */
						       settings,
						       true  /* select default device on failure */));
    
    if (audioDeviceManager.getCurrentAudioDevice()==NULL || error.isNotEmpty())
      {
	AlertWindow::showMessageBox (AlertWindow::WarningIcon,
				     T("Mammut"),
				     T("Couldn't open an output device!\n\n") + error);
      }
    else
      {
	isinitialized=true;
	
	// start the IO device pulling its data from our callback..
	audioDeviceManager.setAudioCallback (this);
	
      }
  }