当前位置: 首页>>代码示例>>C++>>正文


C++ AudioDeviceManager::setMidiInputEnabled方法代码示例

本文整理汇总了C++中AudioDeviceManager::setMidiInputEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ AudioDeviceManager::setMidiInputEnabled方法的具体用法?C++ AudioDeviceManager::setMidiInputEnabled怎么用?C++ AudioDeviceManager::setMidiInputEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AudioDeviceManager的用法示例。


在下文中一共展示了AudioDeviceManager::setMidiInputEnabled方法的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]
}
开发者ID:pingdynasty,项目名称:OwlControl,代码行数:56,代码来源:ApplicationSettingsWindow.cpp

示例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]
}
开发者ID:paulmalyschko,项目名称:OwlNest,代码行数:19,代码来源:ApplicationSettingsWindow.cpp


注:本文中的AudioDeviceManager::setMidiInputEnabled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。