本文整理汇总了C++中Patch::getBpm方法的典型用法代码示例。如果您正苦于以下问题:C++ Patch::getBpm方法的具体用法?C++ Patch::getBpm怎么用?C++ Patch::getBpm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Patch
的用法示例。
在下文中一共展示了Patch::getBpm方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mh_loadPatch
void mh_loadPatch(bool isProject, const char *projPath)
{
G_Mixer.init();
G_Mixer.ready = false; // put it in wait mode
int numChans = G_Patch.getNumChans();
for (int i=0; i<numChans; i++) {
Channel *ch = glue_addChannel(G_Patch.getColumn(i), G_Patch.getType(i));
char smpPath[PATH_MAX];
/* projects < 0.6.3 version are not portable. Just use the regular
* samplePath */
/* TODO version >= 0.10.0 - old stuff, remove backward compatibility */
if (isProject && G_Patch.version >= 0.63f)
sprintf(smpPath, "%s%s%s", gDirname(projPath).c_str(), gGetSlash().c_str(), G_Patch.getSamplePath(i).c_str());
else
sprintf(smpPath, "%s", G_Patch.getSamplePath(i).c_str());
ch->loadByPatch(smpPath, i);
}
G_Mixer.outVol = G_Patch.getOutVol();
G_Mixer.inVol = G_Patch.getInVol();
G_Mixer.bpm = G_Patch.getBpm();
G_Mixer.bars = G_Patch.getBars();
G_Mixer.beats = G_Patch.getBeats();
G_Mixer.quantize = G_Patch.getQuantize();
G_Mixer.metronome = G_Patch.getMetronome();
G_Patch.lastTakeId = G_Patch.getLastTakeId();
G_Patch.samplerate = G_Patch.getSamplerate();
/* rewind and update frames in Mixer (it's vital) */
G_Mixer.rewind();
G_Mixer.updateFrameBars();
G_Mixer.ready = true;
}