本文整理汇总了C++中NoteData::play方法的典型用法代码示例。如果您正苦于以下问题:C++ NoteData::play方法的具体用法?C++ NoteData::play怎么用?C++ NoteData::play使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NoteData
的用法示例。
在下文中一共展示了NoteData::play方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: playPart
void MidiOut::playPart(mid_data &part)
{
NoteData *nd = createNoteData();
resetPlayData();
event = part.list;
tick = part.tempo * part.ippqn;
initClock();
while(1)
{
if(event)
{
if(playEvent(part, nd))
{
// We managed to play the event without having to wait. Move to the next one.
event = event->next;
}
}
else
{
if(loop_num >= 0)
{
popLoop();
}
else if(part.repeat)
{
// Repeat the part.
last_tick = 0;
last_time = 0;
initClock();
event = part.list;
// Handle note-offs?
nd->play();
}
else
{
// We played the last event, exit.
break;
}
}
if(show_notes)
nd->show(part.tempo);
endLoopDelay();
}
delete nd;
}