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


C++ EventBuffer::off方法代码示例

本文整理汇总了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();
开发者ID:craigsapp,项目名称:humextra,代码行数:67,代码来源:humplay.cpp

示例2: finishup

void finishup(void) {
	eventBuffer.off();
	printAllMarkers(cout, markers, data);
	std::fill(markers.begin(), markers.end(), 0);
	colormessage(cout, COLOR_RESET, colormode, colorQ);
}
开发者ID:craigsapp,项目名称:humextra,代码行数:6,代码来源:humplay.cpp


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