您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ triggerAsyncUpdate函数代码示例

51自学网 2021-06-03 08:58:42
  C++
这篇教程C++ triggerAsyncUpdate函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中triggerAsyncUpdate函数的典型用法代码示例。如果您正苦于以下问题:C++ triggerAsyncUpdate函数的具体用法?C++ triggerAsyncUpdate怎么用?C++ triggerAsyncUpdate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: sl

void CtrlrModulatorProcessor::setValueFromHost(const float inValue){	/* called from the audio thread */	{		/* first quickly check if we need to change anything at all */		const ScopedReadLock sl (processorLock);				const int possibleNewValue	= denormalizeValue (inValue, minValue, maxValue);		if (possibleNewValue == currentValue)		{			/* the host told us the same exact value we already have, we won't do anything about it */			triggerAsyncUpdate();			return;		}	}	{		/* if we got here the value from the host is new and we need to update things */		const ScopedWriteLock sl(processorLock);				/* set the new value for the modulator */		currentValue = denormalizeValue (inValue, minValue, maxValue);		/* send a midi message */		sendMidiMessage();	}	/* update the modulator ValueTree and tell the GUI about the changes */	triggerAsyncUpdate();} 
开发者ID:Srikrishna31,项目名称:ctrlr,代码行数:31,


示例2: initialise

    void initialise (const String&) override    {        // initialise our settings file..        PropertiesFile::Options options;        options.applicationName     = "Juce Audio Plugin Host";        options.filenameSuffix      = "settings";        options.osxLibrarySubFolder = "Preferences";        appProperties = new ApplicationProperties();        appProperties->setStorageParameters (options);        LookAndFeel::setDefaultLookAndFeel (&lookAndFeel);        mainWindow = new MainHostWindow();        mainWindow->setUsingNativeTitleBar (true);        commandManager.registerAllCommandsForTarget (this);        commandManager.registerAllCommandsForTarget (mainWindow);        mainWindow->menuItemsChanged();        // Important note! We're going to use an async update here so that if we need        // to re-open a file and instantiate some plugins, it will happen AFTER this        // initialisation method has returned.        // On Windows this probably won't make a difference, but on OSX there's a subtle event loop        // issue that can happen if a plugin runs one of those irritating modal dialogs while it's        // being loaded. If that happens inside this method, the OSX event loop seems to be in some        // kind of special "initialisation" mode and things get confused. But if we load the plugin        // later when the normal event loop is running, everything's fine.        triggerAsyncUpdate();    }
开发者ID:410pfeliciano,项目名称:JUCE,代码行数:32,


示例3: triggerAsyncUpdate

void DiauproPluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages){    buffer.clear();            if (tagCountdown > 0) {        tagCountdown--;        diauproNullProcessor.setTag((uint32) 0);    }else{        tagCountdown = 100;        startTime = Time::getMillisecondCounterHiRes();        diauproNullProcessor.setTag((uint32) 555);    }    diauproNullProcessor.processBlock(buffer, midiMessages);        diauproVCOProcessor.setTag(diauproNullProcessor.getTag());    diauproVCOProcessor.processBlock(buffer, midiMessages);        diauproVCAProcessor.setTag(diauproVCOProcessor.getTag());    diauproVCAProcessor.processBlock(buffer, midiMessages);        if (diauproVCAProcessor.getTag() > 0) {        audioLatency = Time::getMillisecondCounterHiRes() - startTime;    }        triggerAsyncUpdate ();}
开发者ID:alexgustafson,项目名称:DiauproProject,代码行数:27,


示例4: setSelectedId

void ComboBox::setText (const String& newText, const bool dontSendChangeMessage){    for (int i = items.size(); --i >= 0;)    {        const ItemInfo* const item = items.getUnchecked(i);        if (item->isRealItem()             && item->name == newText)        {            setSelectedId (item->itemId, dontSendChangeMessage);            return;        }    }    lastCurrentId = 0;    currentId = 0;    if (label->getText() != newText)    {        label->setText (newText, false);        if (! dontSendChangeMessage)            triggerAsyncUpdate();    }    repaint();}
开发者ID:sonic59,项目名称:JuceS1Text,代码行数:27,


示例5: DocumentWindow

MainAppWindow::MainAppWindow()    : DocumentWindow (JUCEApplication::getInstance()->getApplicationName(),                      Colours::lightgrey,                      DocumentWindow::allButtons){    setUsingNativeTitleBar (true);    setResizable (true, false);    setResizeLimits (400, 400, 10000, 10000);   #if JUCE_IOS || JUCE_ANDROID    setFullScreen (true);   #else    setBounds ((int) (0.1f * getParentWidth()),               (int) (0.1f * getParentHeight()),               jmax (850, (int) (0.5f * getParentWidth())),               jmax (600, (int) (0.7f * getParentHeight())));   #endif    contentComponent = new ContentComponent();    setContentNonOwned (contentComponent, false);    setVisible (true);    // this lets the command manager use keypresses that arrive in our window to send out commands    addKeyListener (getApplicationCommandManager().getKeyMappings());   #if JUCE_WINDOWS || JUCE_LINUX || JUCE_MAC    taskbarIcon = new DemoTaskbarComponent();   #endif   #if JUCE_ANDROID    setOpenGLRenderingEngine();   #endif    triggerAsyncUpdate();}
开发者ID:topilski,项目名称:JUCE,代码行数:35,


示例6: sl

//====================================================================================void PositionableWaveDisplay::imageChanged (AudioThumbnailImage* changedAudioThumbnailImage){	if (changedAudioThumbnailImage == &audioThumbnailImage)	{        {            const ScopedLock sl (imageLock);            cachedImage.clear (cachedImage.getBounds(), backgroundColour);            triggerAsyncUpdate();        }                AudioFormatReaderSource* readerSource = audioFilePlayer.getAudioFormatReaderSource();                AudioFormatReader* reader = nullptr;        if (readerSource != nullptr)            reader = readerSource->getAudioFormatReader();                if (reader != nullptr && reader->sampleRate > 0.0            && audioFilePlayer.getLengthInSeconds() > 0.0)        {            currentSampleRate = reader->sampleRate;            fileLength = audioFilePlayer.getLengthInSeconds();                        if (fileLength > 0.0)                oneOverFileLength = 1.0 / fileLength;            refreshCachedImage();        }        else         {            currentSampleRate = 44100;            fileLength = 0.0;            oneOverFileLength = 1.0;        }	}}
开发者ID:JeromeGill,项目名称:genie,代码行数:36,


示例7: jassert

void ApplicationCommandManager::registerCommand (const ApplicationCommandInfo& newCommand){    // zero isn't a valid command ID!    jassert (newCommand.commandID != 0);    // the name isn't optional!    jassert (newCommand.shortName.isNotEmpty());    if (auto* command = getMutableCommandForID (newCommand.commandID))    {        // Trying to re-register the same command ID with different parameters can often indicate a typo.        // This assertion is here because I've found it useful catching some mistakes, but it may also cause        // false alarms if you're deliberately updating some flags for a command.        jassert (newCommand.shortName == getCommandForID (newCommand.commandID)->shortName                  && newCommand.categoryName == getCommandForID (newCommand.commandID)->categoryName                  && newCommand.defaultKeypresses == getCommandForID (newCommand.commandID)->defaultKeypresses                  && (newCommand.flags & (ApplicationCommandInfo::wantsKeyUpDownCallbacks | ApplicationCommandInfo::hiddenFromKeyEditor | ApplicationCommandInfo::readOnlyInKeyEditor))                       == (getCommandForID (newCommand.commandID)->flags & (ApplicationCommandInfo::wantsKeyUpDownCallbacks | ApplicationCommandInfo::hiddenFromKeyEditor | ApplicationCommandInfo::readOnlyInKeyEditor)));        *command = newCommand;    }    else    {        ApplicationCommandInfo* const newInfo = new ApplicationCommandInfo (newCommand);        newInfo->flags &= ~ApplicationCommandInfo::isTicked;        commands.add (newInfo);        keyMappings->resetToDefaultMapping (newCommand.commandID);        triggerAsyncUpdate();    }}
开发者ID:DISTRHO,项目名称:DISTRHO-Ports,代码行数:32,


示例8: addRecentlyUsedFile

void FilenameComponent::setCurrentFile (File newFile,                                        const bool addToRecentlyUsedList,                                        NotificationType notification){    if (enforcedSuffix.isNotEmpty())        newFile = newFile.withFileExtension (enforcedSuffix);    if (newFile.getFullPathName() != lastFilename)    {        lastFilename = newFile.getFullPathName();        if (addToRecentlyUsedList)            addRecentlyUsedFile (newFile);        filenameBox.setText (lastFilename, dontSendNotification);        if (notification != dontSendNotification)        {            triggerAsyncUpdate();            if (notification == sendNotificationSync)                handleUpdateNowIfNeeded();        }    }}
开发者ID:2DaT,项目名称:Obxd,代码行数:25,


示例9: _INF

void CtrlrUpdateManager::run(){#ifdef LINUX	return;#endif	_INF("Running update check");	sendChangeMessage();	ScopedPointer <XmlElement> xml(getUpdateData());	if (xml)	{		_DBG("--------------------------------------------------------------");		_DBG(xml->createDocument(String::empty));		_DBG("--------------------------------------------------------------");		if (xml->getBoolAttribute("update"))		{			/* new version */			triggerAsyncUpdate();			return;		}	}	sendChangeMessage();}
开发者ID:Srikrishna31,项目名称:ctrlr,代码行数:29,


示例10: sl

ThreadPoolJob::JobStatus EnviIPCRequestJob::runJob(){    const ScopedLock sl (jobLock);    webInputStream = requestURL.withPOSTData(JSON::toString(requestData)).createInputStream (true, &EnviIPCRequestJob::progressCallback, this, "Client: EnviUI", 2000, &responseHeaders);    if (webInputStream)    {        Result res = JSON::parse (webInputStream->readEntireStreamAsString(), responseData);        if (res.wasOk())        {            triggerAsyncUpdate();            return (ThreadPoolJob::jobHasFinished);        }        else        {            _ERR("Response from server can't be parsed as JSON ["+res.getErrorMessage()+"]");            return (ThreadPoolJob::jobNeedsRunningAgain);        }    }    else    {        _ERR("Unable to create connection to server");        return (ThreadPoolJob::jobNeedsRunningAgain);    }}
开发者ID:RomanKubiak,项目名称:envi,代码行数:27,


示例11: jassert

void ApplicationCommandManager::registerCommand (const ApplicationCommandInfo& newCommand){    // zero isn't a valid command ID!    jassert (newCommand.commandID != 0);    // the name isn't optional!    jassert (newCommand.shortName.isNotEmpty());    if (getCommandForID (newCommand.commandID) == 0)    {        ApplicationCommandInfo* const newInfo = new ApplicationCommandInfo (newCommand);        newInfo->flags &= ~ApplicationCommandInfo::isTicked;        commands.add (newInfo);        keyMappings->resetToDefaultMapping (newCommand.commandID);        triggerAsyncUpdate();    }    else    {        // trying to re-register the same command with different parameters?        jassert (newCommand.shortName == getCommandForID (newCommand.commandID)->shortName                  && (newCommand.description == getCommandForID (newCommand.commandID)->description || newCommand.description.isEmpty())                  && newCommand.categoryName == getCommandForID (newCommand.commandID)->categoryName                  && newCommand.defaultKeypresses == getCommandForID (newCommand.commandID)->defaultKeypresses                  && (newCommand.flags & (ApplicationCommandInfo::wantsKeyUpDownCallbacks | ApplicationCommandInfo::hiddenFromKeyEditor | ApplicationCommandInfo::readOnlyInKeyEditor))                       == (getCommandForID (newCommand.commandID)->flags & (ApplicationCommandInfo::wantsKeyUpDownCallbacks | ApplicationCommandInfo::hiddenFromKeyEditor | ApplicationCommandInfo::readOnlyInKeyEditor)));    }}
开发者ID:Amcut,项目名称:pizmidi,代码行数:29,


示例12: TRACE

void DexedAudioProcessor::setCurrentProgram(int index) {    TRACE("setting program %d state", index);    if ( lastStateSave + 2 > time(NULL) ) {        TRACE("skipping save, storage recall to close");        return;    }        panic();        index = index > 31 ? 31 : index;    unpackProgram(index);    lfo.reset(data + 137);    currentProgram = index;    triggerAsyncUpdate();        // reset parameter display    DexedAudioProcessorEditor *editor = (DexedAudioProcessorEditor *) getActiveEditor();    if ( editor == NULL ) {        return;    }    editor->global.setParamMessage("");        panic();}
开发者ID:BNE1,项目名称:dexed,代码行数:25,


示例13: triggerAsyncUpdate

void MainContentComponent::handleMidiNote(int midiChannel, int note){	// Display the Note parameters and add/highlight row in table corresponding to the Note	_lastCommand = String::formatted("%d: Note [%d]", midiChannel, note);	_commandTableModel.addRow(midiChannel, note, false);	_rowToSelect = _commandTableModel.getRowForMessage(midiChannel, note, false);	triggerAsyncUpdate();}
开发者ID:davefoto,项目名称:MIDI2LR,代码行数:8,


示例14: triggerAsyncUpdate

void ComboBox::sendChange (const NotificationType notification){    if (notification != dontSendNotification)        triggerAsyncUpdate();    if (notification == sendNotificationSync)        handleUpdateNowIfNeeded();}
开发者ID:AndyJBuchanan,项目名称:dexed,代码行数:8,


示例15: triggerAsyncUpdate

void CodeEditorComponent::deselectAll(){    if (selectionStart != selectionEnd)        triggerAsyncUpdate();    selectionStart = caretPos;    selectionEnd = caretPos;}
开发者ID:alessandropetrolati,项目名称:juced,代码行数:8,


示例16: triggerAsyncUpdate

void ProfileManager::handleMidiNote(int midi_channel, int note) {  const MIDI_Message note_msg{midi_channel, note, false};  if (command_map_) {      // return if the command isn't a valid profile-related command    if (!command_map_->messageExistsInMap(note_msg))      return;    if (command_map_->getCommandforMessage(note_msg) == "Previous Profile") {      switch_state_ = SWITCH_STATE::PREV;      triggerAsyncUpdate();    }    else if (command_map_->getCommandforMessage(note_msg) == "Next Profile") {      switch_state_ = SWITCH_STATE::NEXT;      triggerAsyncUpdate();    }  }}
开发者ID:ChristopherAlan,项目名称:MIDI2LR,代码行数:18,


示例17: run

 void run() {     if (downloaded.loadFromWebsite())         triggerAsyncUpdate();     else         AlertWindow::showMessageBox (AlertWindow::InfoIcon,                                      "Module Update",                                      "Couldn't connect to the JUCE webserver!"); }
开发者ID:HsienYu,项目名称:JUCE,代码行数:9,


示例18: deviceIndex

ChannelViewport::ChannelViewport(int const deviceIndex_, ValueTree channelsTree_, CriticalSection &lock_) :	deviceIndex(deviceIndex_),	channelsTree(channelsTree_),	lock(lock_){	setViewedComponent(&content);	triggerAsyncUpdate();}
开发者ID:mattgonzalez,项目名称:WorkbenchRemote,代码行数:9,


示例19: throw

//==============================================================================void CodeEditorComponent::setTabSize (const int numSpaces, const bool insertSpaces) throw(){    useSpacesForTabs = insertSpaces;    if (spacesPerTab != numSpaces)    {        spacesPerTab = numSpaces;        triggerAsyncUpdate();    }}
开发者ID:alessandropetrolati,项目名称:juced,代码行数:11,


示例20: m_model

Base::Base (Model::Base::Ptr model)  : m_model (model){  if (m_model != nullptr)  {    m_model->addListener (this);    triggerAsyncUpdate ();  }}
开发者ID:lucem,项目名称:VFLib,代码行数:10,


示例21: abs

void CodeEditorComponent::moveCaretTo (const CodeDocument::Position& newPos, const bool highlighting){    caretPos = newPos;    columnToTryToMaintain = -1;    if (highlighting)    {        if (dragType == notDragging)        {            if (abs (caretPos.getPosition() - selectionStart.getPosition())                  < abs (caretPos.getPosition() - selectionEnd.getPosition()))                dragType = draggingSelectionStart;            else                dragType = draggingSelectionEnd;        }        if (dragType == draggingSelectionStart)        {            selectionStart = caretPos;            if (selectionEnd.getPosition() < selectionStart.getPosition())            {                const CodeDocument::Position temp (selectionStart);                selectionStart = selectionEnd;                selectionEnd = temp;                dragType = draggingSelectionEnd;            }        }        else        {            selectionEnd = caretPos;            if (selectionEnd.getPosition() < selectionStart.getPosition())            {                const CodeDocument::Position temp (selectionStart);                selectionStart = selectionEnd;                selectionEnd = temp;                dragType = draggingSelectionStart;            }        }        triggerAsyncUpdate();    }    else    {        deselectAll();    }    updateCaretPosition();    scrollToKeepCaretOnScreen();    updateScrollBars();}
开发者ID:SonicPotions,项目名称:editor,代码行数:54,


示例22: callTimersSynchronously

    void callTimersSynchronously()    {        if (! isThreadRunning())        {            // (This is relied on by some plugins in cases where the MM has            // had to restart and the async callback never started)            cancelPendingUpdate();            triggerAsyncUpdate();        }        callTimers();    }
开发者ID:ChunHungLiu,项目名称:av-caster,代码行数:12,


示例23: constrainedRange

void ScrollBar::setCurrentRange (const Range<double>& newRange){    const Range<double> constrainedRange (totalRange.constrainRange (newRange));    if (visibleRange != constrainedRange)    {        visibleRange = constrainedRange;        updateThumbPosition();        triggerAsyncUpdate();    }}
开发者ID:SonicPotions,项目名称:editor,代码行数:12,



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


C++ triggerEvent函数代码示例
C++ triggerAction函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。