Esempio n. 1
0
AudioConfigurationWindow::AudioConfigurationWindow(AudioDeviceManager& adm, Button* cButton)
    : DocumentWindow("Audio Settings",
                     Colours::red,
                     DocumentWindow::closeButton),
    controlButton(cButton)

{
    centreWithSize(360,300);
    setUsingNativeTitleBar(true);
    setResizable(false,false);

    //std::cout << "Audio CPU usage:" << adm.getCpuUsage() << std::endl;

    AudioDeviceSelectorComponent* adsc = new AudioDeviceSelectorComponent
    (adm,
     0, // minAudioInputChannels
     2, // maxAudioInputChannels
     0, // minAudioOutputChannels
     2, // maxAudioOutputChannels
     false, // showMidiInputOptions
     false, // showMidiOutputSelector
     false, // showChannelsAsStereoPairs
     false); // hideAdvancedOptionsWithButton

    adsc->setBounds(0,0,450,240);

    setContentOwned(adsc, true);
    setVisible(false);
    //setContentComponentSize(getWidth(), getHeight());
}
Esempio n. 2
0
void MainHostWindow::showAudioSettings()
{
    AudioDeviceSelectorComponent audioSettingsComp (deviceManager,
                                                    0, 256,
                                                    0, 256,
                                                    true, true, true, false);

    audioSettingsComp.setSize (500, 450);

    DialogWindow::LaunchOptions o;
    o.content.setNonOwned (&audioSettingsComp);
    o.dialogTitle                   = "Audio Settings";
    o.componentToCentreAround       = this;
    o.dialogBackgroundColour        = Colours::azure;
    o.escapeKeyTriggersCloseButton  = true;
    o.useNativeTitleBar             = false;
    o.resizable                     = false;

    o.runModal();

    ScopedPointer<XmlElement> audioState (deviceManager.createStateXml());

    appProperties->getUserSettings()->setValue ("audioDeviceState", audioState);
    appProperties->getUserSettings()->saveIfNeeded();

    GraphDocumentComponent* const graphEditor = getGraphEditor();

    if (graphEditor != nullptr)
        graphEditor->graph.removeIllegalConnections();
}
void MainHostWindow::showAudioSettings()
{
    AudioDeviceSelectorComponent audioSettingsComp (deviceManager,
                                                    0, 256,
                                                    0, 256,
                                                    true, true, true, false);

    audioSettingsComp.setSize (500, 450);

    DialogWindow::showModalDialog (T("Audio Settings"),
                                   &audioSettingsComp,
                                   this,
                                   Colours::azure,
                                   true);

    XmlElement* const audioState = deviceManager.createStateXml();

    ApplicationProperties::getInstance()->getUserSettings()
        ->setValue (T("audioDeviceState"), audioState);

    delete audioState;

    ApplicationProperties::getInstance()->getUserSettings()->saveIfNeeded();

    GraphDocumentComponent* const graphEditor = getGraphEditor();

    if (graphEditor != 0)
        graphEditor->graph.removeIllegalConnections();
}
Esempio n. 4
0
void AudioControl::showAudioPreferences(Component* centerComponent)
{
    AudioDeviceSelectorComponent audioSettingsComp (audioDeviceManager,
                                                    0, 2, 2, 2,
                                                    true, true, true, true);
    audioSettingsComp.setSize (500, 250);
    DialogWindow::showModalDialog ("Audio Settings", &audioSettingsComp, centerComponent, Colours::lightgrey, true);
    
}
Esempio n. 5
0
    ContentComp (MainAppWindow* mainWindow_)
        : mainWindow (mainWindow_)
    {
        label = new Label (T("asdsads"), T("asd"));
        label->setBounds (500, 10, 280, 20);
        addAndMakeVisible(label);


        AudioDeviceSelectorComponent *sel = new AudioDeviceSelectorComponent(*mainWindow->mAudio, 0, 2, 0, 2, true, true, true, false);
        sel->setBounds (0, 0, 500, 600);
        addAndMakeVisible(sel);
    }
void StandaloneFilterWindow::showAudioSettingsDialog()
{
    AudioDeviceSelectorComponent selectorComp (*deviceManager,
                                               filter->getNumInputChannels(),
                                               filter->getNumInputChannels(),
                                               filter->getNumOutputChannels(),
                                               filter->getNumOutputChannels(),
                                               true, false, true, true);

    selectorComp.setSize (500, 450);

    DialogWindow::showModalDialog (TRANS("Audio Settings"), &selectorComp, this, Colours::lightgrey, true, false, false);
}
//==============================================================================
void TransportComponent::showAudioSettings()
{
    AudioDeviceSelectorComponent settingsComp (audioDeviceManager,
                                               1, 2,
                                               1, 2,
                                               false, false,
                                               true, false);
    settingsComp.setSize (500, 400);
    LookAndFeel_V3 settingsLaf;
    settingsLaf.setColour (Label::textColourId, Colours::white);
    settingsLaf.setColour (TextButton::buttonColourId, Colours::white);
    settingsLaf.setColour (TextButton::textColourOffId, Colours::black);
    settingsComp.setLookAndFeel (&settingsLaf);
    
    DialogWindow::showModalDialog ("Audio Settings",
                              &settingsComp, nullptr,
                              Colours::darkgrey,
                              true, true, true);
}
Esempio n. 8
0
  void prefs(){
      
    if(isusingjack==true){
      printerror("Can not change audio when using jack.");
      return;
    }

    AudioDeviceSelectorComponent audioSettingsComp (audioDeviceManager,
						    0, 0,
						    2, 8,
						    false);
    
    // ...and show it in a DialogWindow...
    audioSettingsComp.setSize (400, 170);
    
    DialogWindow::showModalDialog (T("Audio Settings"),
				   &audioSettingsComp,
				   NULL,Colour((uint8)0xb90,(uint8)0x60,(uint8)0x60,(uint8)0xd0),true);
    if(audioDeviceManager.getCurrentAudioDevice()==NULL && isreadingdata==true){
      isreadingdata=false;
    }
  }
void StandaloneFilterWindow::showAudioSettingsDialog()
{
    AudioDeviceSelectorComponent selectorComp (*deviceManager,
                                               filter->getNumInputChannels(),
                                               filter->getNumInputChannels(),
                                               filter->getNumOutputChannels(),
                                               filter->getNumOutputChannels(),
                                               true, true, false, false);

    selectorComp.setSize (500, 550);

    DialogWindow::showModalDialog (TRANS("Audio/Midi Settings"),
                                   &selectorComp,
                                   this,
                                   Colours::lightgrey,
                                   true,
                                   false,
                                   false);
								   
	// reset filter so all enabled midi inputs are available...
	deviceManager->setFilter (filter);
}
Esempio n. 10
0
void CSLSignalComponent::buttonClicked (Button* buttonThatWasClicked)
{
    //[UserbuttonClicked_Pre]
    //[/UserbuttonClicked_Pre]

    if (buttonThatWasClicked == playButton)
    {
        //[UserButtonCode_playButton] -- add your button handler code here..

		this->startStop(gFcn);

        //[/UserButtonCode_playButton]
    }
    else if (buttonThatWasClicked == quitButton)
    {
        //[UserButtonCode_quitButton] -- add your button handler code here..

		if (playing)
			this->startStop(gFcn);
		JUCEApplication::quit();

        //[/UserButtonCode_quitButton]
    }
    else if (buttonThatWasClicked == prefsButton)
    {
        //[UserButtonCode_prefsButton] -- add your button handler code here..

					// Create an AudioDeviceSelectorComponent which contains the audio choice widgets...
//		if (displayMode) {
//			oscilloscopeL->stop();			// stop scope display during dialog
//			oscilloscopeR->stop();
//		} else {
//			spectrogam->stop();
//		}
//		   AudioDeviceSelectorComponent (AudioDeviceManager& deviceManager,
//                                  const int minAudioInputChannels,
//                                  const int maxAudioInputChannels,
//                                  const int minAudioOutputChannels,
//                                  const int maxAudioOutputChannels,
//                                  const bool showMidiInputOptions,
//                                  const bool showMidiOutputSelector,
//                                  const bool showChannelsAsStereoPairs,
//                                  const bool hideAdvancedOptionsWithButton);

		AudioDeviceSelectorComponent audioSettingsComp (mAudioDeviceManager,
														CGestalt::numInChannels(), CGestalt::numInChannels(),
														CGestalt::numOutChannels(), CGestalt::numOutChannels(),
														true, true,
														false, false);
											// ...and show it in a DialogWindow...
		audioSettingsComp.setSize (500, 400);
		DialogWindow::showModalDialog ("Audio Settings",
									   &audioSettingsComp,
									   this,
									   Colours::azure,
									   true);
//		if (displayMode) {
//			oscilloscopeL->start();			// stop scope display during dialog
//			oscilloscopeR->start();
//		} else {
//			spectrogam->start();
//		}

        //[/UserButtonCode_prefsButton]
    }
    else if (buttonThatWasClicked == loopButton)
    {
        //[UserButtonCode_loopButton] -- add your button handler code here..

		if (loop) {
			if (loopThread) {
				loopThread->stopThread(100);
				delete loopThread;
				loopThread = 0;
			}
		}
		loop = ! loop;

        //[/UserButtonCode_loopButton]
    }
    else if (buttonThatWasClicked == recordButton)
    {
        //[UserButtonCode_recordButton] -- add your button handler code here..

		bool wasRec = recrding;
		recordOnOff();
		if (wasRec)
			recrding = false;

        //[/UserButtonCode_recordButton]
    }

    //[UserbuttonClicked_Post]
    //[/UserbuttonClicked_Post]
}