本文整理汇总了C++中Patch::getIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ Patch::getIndex方法的具体用法?C++ Patch::getIndex怎么用?C++ Patch::getIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Patch
的用法示例。
在下文中一共展示了Patch::getIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadByPatch
int SampleChannel::loadByPatch(const char *f, int i)
{
int res = load(f);
volume = G_Patch.getVol(i);
key = G_Patch.getKey(i);
index = G_Patch.getIndex(i);
mode = G_Patch.getMode(i);
mute = G_Patch.getMute(i);
mute_s = G_Patch.getMute_s(i);
solo = G_Patch.getSolo(i);
boost = G_Patch.getBoost(i);
panLeft = G_Patch.getPanLeft(i);
panRight = G_Patch.getPanRight(i);
readActions = G_Patch.getRecActive(i);
recStatus = readActions ? REC_READING : REC_STOPPED;
readPatchMidiIn(i);
midiInReadActions = G_Patch.getMidiValue(i, "InReadActions");
midiInPitch = G_Patch.getMidiValue(i, "InPitch");
readPatchMidiOut(i);
if (res == SAMPLE_LOADED_OK) {
setBegin(G_Patch.getBegin(i));
setEnd (G_Patch.getEnd(i, wave->size));
setPitch(G_Patch.getPitch(i));
}
else {
// volume = DEFAULT_VOL;
// mode = DEFAULT_CHANMODE;
// status = STATUS_WRONG;
// key = 0;
if (res == SAMPLE_LEFT_EMPTY)
status = STATUS_EMPTY;
else
if (res == SAMPLE_READ_ERROR)
status = STATUS_MISSING;
sendMidiLplay();
}
return res;
}