本文整理汇总了C++中EventBuffer::checkPoll方法的典型用法代码示例。如果您正苦于以下问题:C++ EventBuffer::checkPoll方法的具体用法?C++ EventBuffer::checkPoll怎么用?C++ EventBuffer::checkPoll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventBuffer
的用法示例。
在下文中一共展示了EventBuffer::checkPoll方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mainloopalgorithms
void mainloopalgorithms(void) {
eventBuffer.checkPoll(); // see if any notes need playing
while (synth.getNoteCount() > 0) {
processNote(synth.extractNote());
}
}
示例2: mainloopalgorithms
void mainloopalgorithms(void) {
eventBuffer.checkPoll(); // see if any notes to play
while (synth.getNoteCount() > 0) {
message = synth.extractNote();
processNote(message);
}
}
示例3: mainloopalgorithms
void mainloopalgorithms(void) {
eventBuffer.checkPoll(); // see if any notes need playing
while (synth.getNoteCount() > 0) {
noteMessage = synth.extractNote();
if (noteMessage.getP2() != 0) {
playchord(noteMessage, chordType, onset, duration);
}
}
}
示例4: mainloopalgorithms
void mainloopalgorithms(void) {
eventbuffer.checkPoll();
if (nextpatterntime <= t_time) {
patternbeats = nextpattern + 2;
if (nextpattern == 0) {
patternbeats = 3;
}
nextpatterntime = t_time + (int)(60.0/tempo*1000*patternbeats + 0.5);
playNextPattern(eventbuffer, rpscore, nextpattern, nextsubpattern, tempo);
}
}
示例5: mainloopalgorithms
void mainloopalgorithms(void) {
eventBuffer.checkPoll();
if (pauseQ) {
return;
}
if (timer.expired()) {
playdata(data, linenum, timer);
if (linenum >= data.getNumLines()) {
printAllMarkers(cout, markers, data);
std::fill(markers.begin(), markers.end(), 0);
inputNewFile();
}
}
}
示例6: mainloopalgorithms
void mainloopalgorithms(void) {
eventBuffer.checkPoll(); // see if any notes to play
while (synth.getNoteCount() > 0) {
message = synth.extractNote();
if (message.getP2() != 0) {
lastnotes.insert(message.getP1());
lasttimes.insert(message.tick);
distancee = lastnotes[0] - lastnotes[1];
duration = lasttimes[0] - lasttimes[1];
channel = 0x0f & message.getP0();
if (distancee != 0) {
playgliss(message.getP1(), message.getP2(), channel, duration, distancee);
}
}
}
}
示例7: mainloopalgorithms
void mainloopalgorithms(void) {
eventBuffer.checkPoll();
while (synth.getNoteCount() > 0) {
message = synth.extractNote();
if (message.isNoteOn() && message.getP1() == A0) {
direction = -direction;
cout << "Direction = " << direction << endl;
} else if (message.isNoteOn() && message.getP1() == C7) {
// add one to the length of the tumble sequence
length = limit(length+1, 2, 200);
cout << "Sequence length = " << length << endl;
} else if (message.isNoteOn() && message.getP1() == B6) {
// subtract one from the length of the tumble sequence
length = limit(length-1, 2, 200);
cout << "Sequence length = " << length << endl;
} else {
processNote(message, length, direction);
}
}
}