本文整理汇总了C++中MidiTrack::isMute方法的典型用法代码示例。如果您正苦于以下问题:C++ MidiTrack::isMute方法的具体用法?C++ MidiTrack::isMute怎么用?C++ MidiTrack::isMute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MidiTrack
的用法示例。
在下文中一共展示了MidiTrack::isMute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processMidi
void Audio::processMidi()
{
midiBusy = true;
//
// TODO: syntis should directly write into recordEventList
//
for (iMidiDevice id = midiDevices.begin(); id != midiDevices.end(); ++id)
{
MidiDevice* md = *id;
MPEventList* playEvents = md->playEvents();
//
// erase already played events:
//
iMPEvent nextPlayEvent = md->nextPlayEvent();
playEvents->erase(playEvents->begin(), nextPlayEvent);
// klumsy hack for synti devices:
if (md->isSynti())
{
SynthI* s = (SynthI*) md;
while (s->eventsPending())
{
MidiRecordEvent ev = s->receiveEvent();
md->recordEvent(ev);
}
}
// Is it a Jack midi device?
//MidiJackDevice* mjd = dynamic_cast<MidiJackDevice*>(md);
//if(mjd)
// mjd->collectMidiEvents();
md->collectMidiEvents();
// Take snapshots of the current sizes of the recording fifos,
// because they may change while here in process, asynchronously.
md->beforeProcess();
}
MPEventList* playEvents = metronome->playEvents();
iMPEvent nextPlayEvent = metronome->nextPlayEvent();
playEvents->erase(playEvents->begin(), nextPlayEvent);
// p3.3.25
bool extsync = extSyncFlag.value();
for (iMidiTrack t = song->midis()->begin(); t != song->midis()->end(); ++t)
{
MidiTrack* track = *t;
int port = track->outPort();
MidiDevice* md = midiPorts[port].device();
// Changed by Tim. p3.3.8
//if(md == 0)
// continue;
//MPEventList* playEvents = md->playEvents();
//if (playEvents == 0)
// continue;
//if (!track->isMute())
MPEventList* playEvents = 0;
if (md)
{
playEvents = md->playEvents();
// only add track events if the track is unmuted
if (!track->isMute())
{
if (isPlaying() && (curTickPos < nextTickPos))
collectEvents(track, curTickPos, nextTickPos);
}
}
//
//----------midi recording
//
if (track->recordFlag())
{
//int portMask = track->inPortMask();
// p3.3.38 Removed
//unsigned int portMask = track->inPortMask();
//int channelMask = track->inChannelMask();
MPEventList* rl = track->mpevents();
MidiPort* tport = &midiPorts[port];
// p3.3.38
//for (iMidiDevice id = midiDevices.begin(); id != midiDevices.end(); ++id)
//{
RouteList* irl = track->inRoutes();
for (ciRoute r = irl->begin(); r != irl->end(); ++r)
{
//if(!r->isValid() || (r->type != Route::ALSA_MIDI_ROUTE && r->type != Route::JACK_MIDI_ROUTE))
//if(!r->isValid() || (r->type != Route::MIDI_DEVICE_ROUTE))
if (!r->isValid() || (r->type != Route::MIDI_PORT_ROUTE)) // p3.3.49
continue;
int devport = r->midiPort; // p3.3.49
if (devport == -1)
continue;
//.........这里部分代码省略.........