This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 发送消息块。1参:MIDI缓冲(引用型对象)。2参:开始时间(毫秒)。3参:每秒的采样数 | |
// 本函数用于将MIDI缓冲数据发送至MIDI设备,从而发出声音。是MidiOutput类的核心函数,也是实现播放MIDI文件的功能性函数 | |
void MidiOutput::sendBlockOfMessages (const MidiBuffer& buffer, | |
const double millisecondCounterToStartAt, | |
double samplesPerSecondForBuffer) | |
{ | |
// 执行此函数之前,必须启动后台线程。如果尚未启动,则首先执行startBackgroundThread()函数,而后再调用本函数. 此处使用了一个断言。如果尚未启动后台线程,则调试时程序代码将停留在此处。 | |
// The thread must be started before calling this function. | |
jassert (isThreadRunning()); |