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


C++ Transport::isLooping方法代码示例

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


在下文中一共展示了Transport::isLooping方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: perform

bool HostFilterComponent::perform (const InvocationInfo& info)
{
    Config* config = Config::getInstance();

    GraphComponent* graph = main->getGraph ();
    Transport* transport = getFilter()->getTransport();

    switch (info.commandID)
    {
    //----------------------------------------------------------------------------------------------
    case CommandIDs::pluginOpen:
        {
            graph->loadAndAppendPlugin ();
            break;
        }
    case CommandIDs::pluginClose:
        {
            graph->closeSelectedPlugins ();
            break;
        }
    case CommandIDs::pluginClear:
        {
            graph->closeAllPlugins ();
            break;
        }
    case CommandIDs::showPluginListEditor:
        {
           if (PluginListWindow::currentPluginListWindow == 0)
               PluginListWindow::currentPluginListWindow = new PluginListWindow (knownPluginList);

           PluginListWindow::currentPluginListWindow->toFront (true);
            
            break;
        }

    //----------------------------------------------------------------------------------------------
#ifndef JOST_VST_PLUGIN
    case CommandIDs::audioOptions:
        {
            StandaloneFilterWindow* window = findParentComponentOfClass ((StandaloneFilterWindow*) 0);
            if (window)
                window->showAudioSettingsDialog ();

            break;
        }
#endif

    case CommandIDs::audioPlay:
        {
            transport->play ();
            break;
        }
    case CommandIDs::audioPlayPause:
        {
            transport->togglePlay ();
            break;
        }
    case CommandIDs::audioStop:
        {
            transport->stop ();
            break;
        }
    case CommandIDs::audioRecord:
        {
            transport->record ();
            break;
        }
    case CommandIDs::audioRewind:
        {
            transport->rewind ();
            break;
        }
    case CommandIDs::audioLoop:
        {
            transport->setLooping (! transport->isLooping());
            break;
        }

    //----------------------------------------------------------------------------------------------
    case CommandIDs::sessionNew:
        {
           bool retValue = 
               AlertWindow::showYesNoCancelBox (AlertWindow::WarningIcon,
                                             T("Unsaved Changes"),
                                             T("Are you sure you want to close the current session? You may lose any unsaved changes."));
            if (retValue)
            {
               closePluginEditorWindows ();
               getFilter()->getHost ()->closeAllPlugins (true);

               clearComponents ();
               Config::getInstance()->lastSessionFile = File::nonexistent;
               rebuildComponents ();
            }
            break;
        }
    
    case CommandIDs::sessionLoad:
        {
            FileChooser myChooser (T("Load a session file..."),
//.........这里部分代码省略.........
开发者ID:christianscheuer,项目名称:jivemodular,代码行数:101,代码来源:HostFilterComponent.cpp

示例2: getCommandInfo

// This method is used when something needs to find out the details about one of the commands
// that this object can perform..
void HostFilterComponent::getCommandInfo (const CommandID commandID, ApplicationCommandInfo& result)
{
    const int none = 0;
    const int cmd = ModifierKeys::commandModifier;
    // const int shift = ModifierKeys::shiftModifier;

    GraphComponent* graph = main->getGraph ();
    Transport* transport = getFilter()->getTransport();

    switch (commandID)
    {
    //----------------------------------------------------------------------------------------------
    case CommandIDs::pluginOpen:
        result.setInfo (T("Open Plugin..."), T("Open a plugin"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('l'), cmd);
        result.setActive (true);
        break;
    case CommandIDs::pluginClose:
        {
        result.setInfo (T("Close Plugins"), T("Close selected plugins"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('k'), cmd);
        // TODO - have to update this !
//        GraphComponent* track = tracks.getUnchecked (0);
//        result.setActive ((track ? (track->getSelectedPlugin () != -1) : false));
        result.setActive (false);
        break;
        }
    case CommandIDs::pluginClear:
        {
        result.setInfo (T("Clear Plugins"), T("Close all plugins"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('j'), cmd);
        result.setActive ((graph ? (graph->getPluginsCount () > 2) : false));
        break;
        }
    case CommandIDs::showPluginListEditor:
        {
        result.setInfo (T("Show Plugin List"), T("Show plugin list window"), CommandCategories::file, 0);
        result.addDefaultKeypress (T('p'), cmd);
        result.setActive (true);
        break;
        }
    //----------------------------------------------------------------------------------------------
#ifndef JOST_VST_PLUGIN
    case CommandIDs::audioOptions:
        {
        result.setInfo (T("Audio & MIDI Settings..."), T("Show device manager"), CommandCategories::audio, 0);
        // result.addDefaultKeypress (KeyPress::backspaceKey, none);
        result.setActive (true);
        break;
        }
#endif
    case CommandIDs::audioPlay:
        {
        result.setInfo (T("Play"), T("Play sequencers"), CommandCategories::audio, 0);
        if (! transport->isPlaying())
            result.addDefaultKeypress (KeyPress::spaceKey, none);
        result.setActive (! transport->isPlaying());
        break;
        }
    case CommandIDs::audioPlayPause:
        {
        if (transport->isPlaying())
            result.setInfo (T("Pause"), T("Pause sequencers"), CommandCategories::audio, 0);
        else
            result.setInfo (T("Play"), T("Play sequencers"), CommandCategories::audio, 0);
         result.addDefaultKeypress (KeyPress::spaceKey, none);
        break;
        }
    case CommandIDs::audioStop:
        {
        result.setInfo (T("Stop"), T("Stop sequencers"), CommandCategories::audio, 0);
        if (transport->isPlaying())
            result.addDefaultKeypress (KeyPress::spaceKey, none);
        result.setActive (transport->isPlaying());
        break;
        }
    case CommandIDs::audioRecord:
        {
        result.setInfo (T("Record"), T("Activate recording"), CommandCategories::audio, 0);
        result.addDefaultKeypress (T('r'), cmd);
        result.setTicked (transport->isRecording());
        result.setActive (true);
        break;
        }
    case CommandIDs::audioRewind:
        {
        result.setInfo (T("Rewind"), T("Rewind sequencers"), CommandCategories::audio, 0);
        result.addDefaultKeypress (KeyPress::backspaceKey, none);
        result.setActive (transport->getPositionInFrames() != 0);
        break;
        }
    case CommandIDs::audioLoop:
        {
        result.setInfo (T("Looping"), T("Loop sequencers"), CommandCategories::audio, 0);
        result.addDefaultKeypress (T('l'), cmd);
        result.setTicked (transport->isLooping());
        result.setActive (true);
        break;
//.........这里部分代码省略.........
开发者ID:christianscheuer,项目名称:jivemodular,代码行数:101,代码来源:HostFilterComponent.cpp


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