本文整理汇总了C++中EventBuffer::off方法的典型用法代码示例。如果您正苦于以下问题:C++ EventBuffer::off方法的具体用法?C++ EventBuffer::off怎么用?C++ EventBuffer::off使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventBuffer
的用法示例。
在下文中一共展示了EventBuffer::off方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: keyboardchar
//.........这里部分代码省略.........
}
} else {
int tracknum = getKernTrack(number, data);
trackmute[tracknum] = !trackmute[tracknum];
if (trackmute[tracknum]) {
cout << "!! **kern spine " << number << " is muted" << endl;
} else {
cout << "!! **kern spine " << number << " is unmuted" << endl;
}
}
break;
break;
case 'n': // toggle display of note only (supression
// of beam and stem display
// Also, don't display ![!]LO: lines.
noteonlyQ = !noteonlyQ;
if (noteonlyQ) {
cout << "!! Notes only: supressing beams and stems in **kern data"
<< endl;
} else {
cout << "!! Displaying **kern data unmodified" << endl;
}
break;
case 'o': // set the tempo to a particular value
if (number > 20 && number < 601) {
cout << "!! TEMPO SET TO " << number << endl;
tempo = number;
tempoScale = 1.0;
} else if (number == 0) {
cout << "!! Current tempo: " << tempo * tempoScale << endl;
}
break;
case 'p': // toggle music pausing
eventBuffer.off();
timer.reset();
pauseQ = !pauseQ;
if (pauseQ) {
cout << "!! Paused" << endl;
}
break;
case 'q': // toggle display of file while playing
echoTextQ = !echoTextQ;
if (echoTextQ) {
cout << "!! FILE DISPLAY TURNED ON" << endl;
} else {
cout << "!! FILE DISPLAY TURNED OFF" << endl;
}
break;
case 'r': // return to a marker
if (number == 0) {
linenum = markers[0];
cout << "!! Going to line " << linenum << endl;
eventBuffer.off();
timer.reset();
} else if (number < (int)markers.size()) {
linenum = markers[number];
cout << "!! Going to line " << linenum << endl;
eventBuffer.off();
timer.reset();
}
break;
case 'R': // Print a list of all markers
printAllMarkers(cout, markers, data);
break;
case 's': // silence notes
eventBuffer.off();
示例2: finishup
void finishup(void) {
eventBuffer.off();
printAllMarkers(cout, markers, data);
std::fill(markers.begin(), markers.end(), 0);
colormessage(cout, COLOR_RESET, colormode, colorQ);
}