本文整理汇总了C++中AudioDeviceManager::setDefaultMidiOutput方法的典型用法代码示例。如果您正苦于以下问题:C++ AudioDeviceManager::setDefaultMidiOutput方法的具体用法?C++ AudioDeviceManager::setDefaultMidiOutput怎么用?C++ AudioDeviceManager::setDefaultMidiOutput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AudioDeviceManager
的用法示例。
在下文中一共展示了AudioDeviceManager::setDefaultMidiOutput方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: theSettings
//==============================================================================
ApplicationSettingsWindow::ApplicationSettingsWindow (OwlControlSettings& settings, AudioDeviceManager& deviceManager)
: theSettings(settings)
{
//[Constructor_pre] You can add your own custom stuff here..
//[/Constructor_pre]
addAndMakeVisible (audioSelector = new AudioDeviceSelectorComponent (deviceManager,0,0,0,0,true,true,false,false));
audioSelector->setName ("new component");
addAndMakeVisible (midiDeviceBox = new ComboBox ("new combo box"));
midiDeviceBox->setEditableText (false);
midiDeviceBox->setJustificationType (Justification::centredLeft);
midiDeviceBox->setTextWhenNothingSelected (String());
midiDeviceBox->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
midiDeviceBox->addItem (TRANS("OMNI"), 1);
midiDeviceBox->addItem (TRANS("1"), 2);
midiDeviceBox->addItem (TRANS("2"), 3);
midiDeviceBox->addItem (TRANS("3"), 4);
midiDeviceBox->addItem (TRANS("4"), 5);
midiDeviceBox->addItem (TRANS("5"), 6);
midiDeviceBox->addItem (TRANS("6"), 7);
midiDeviceBox->addItem (TRANS("7"), 8);
midiDeviceBox->addItem (TRANS("8"), 9);
midiDeviceBox->addItem (TRANS("9"), 10);
midiDeviceBox->addItem (TRANS("10"), 11);
midiDeviceBox->addItem (TRANS("11"), 12);
midiDeviceBox->addItem (TRANS("12"), 13);
midiDeviceBox->addItem (TRANS("13"), 14);
midiDeviceBox->addItem (TRANS("14"), 15);
midiDeviceBox->addItem (TRANS("15"), 16);
midiDeviceBox->addItem (TRANS("16"), 17);
midiDeviceBox->addListener (this);
addAndMakeVisible (label = new Label ("new label",
TRANS("MIDI Device")));
label->setFont (Font (15.00f, Font::plain));
label->setJustificationType (Justification::centredLeft);
label->setEditable (false, false, false);
label->setColour (TextEditor::textColourId, Colours::black);
label->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
//[UserPreSize]
//[/UserPreSize]
setSize (600, 400);
//[Constructor] You can add your own custom stuff here..
PropertySet* properties = ApplicationConfiguration::getApplicationProperties();
deviceManager.setDefaultMidiOutput(properties->getValue("midi-output"));
deviceManager.setMidiInputEnabled(properties->getValue("midi-input"), 1);
//[/Constructor]
}
示例2: addAndMakeVisible
//==============================================================================
ApplicationSettingsWindow::ApplicationSettingsWindow (AudioDeviceManager& deviceManager)
{
addAndMakeVisible (audioSelector = new AudioDeviceSelectorComponent (deviceManager,0,2,0,2,true,true,false,false));
audioSelector->setName ("new component");
//[UserPreSize]
//[/UserPreSize]
setSize (600, 400);
//[Constructor] You can add your own custom stuff here..
PropertySet* properties = ApplicationConfiguration::getApplicationProperties();
deviceManager.setDefaultMidiOutput(properties->getValue("midi-output"));
deviceManager.setMidiInputEnabled(properties->getValue("midi-input"), 1);
//[/Constructor]
}