本文整理汇总了C++中Mixer::rewind方法的典型用法代码示例。如果您正苦于以下问题:C++ Mixer::rewind方法的具体用法?C++ Mixer::rewind怎么用?C++ Mixer::rewind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mixer
的用法示例。
在下文中一共展示了Mixer::rewind方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mh_rewindSequencer
void mh_rewindSequencer()
{
if (G_Mixer.quantize > 0 && G_Mixer.running)
G_Mixer.rewindWait = true;
else
G_Mixer.rewind();
}
示例2: mh_readPatch
void mh_readPatch()
{
G_Mixer.ready = false;
G_Mixer.outVol = G_Patch.masterVolOut;
G_Mixer.inVol = G_Patch.masterVolIn;
G_Mixer.bpm = G_Patch.bpm;
G_Mixer.bars = G_Patch.bars;
G_Mixer.beats = G_Patch.beats;
G_Mixer.quantize = G_Patch.quantize;
G_Mixer.metronome = G_Patch.metronome;
#ifdef WITH_VST
__mh_readPatchPlugins__(&G_Patch.masterInPlugins, PluginHost::MASTER_IN);
__mh_readPatchPlugins__(&G_Patch.masterOutPlugins, PluginHost::MASTER_OUT);
#endif
G_Mixer.rewind();
G_Mixer.updateFrameBars();
G_Mixer.ready = true;
}
示例3: mh_loadPatch_DEPR_
void mh_loadPatch_DEPR_(bool isProject, const char *projPath)
{
G_Mixer.init();
G_Mixer.ready = false;
int numChans = G_Patch_DEPR_.getNumChans();
for (int i=0; i<numChans; i++) {
Channel *ch = glue_addChannel(G_Patch_DEPR_.getColumn(i), G_Patch_DEPR_.getType(i));
string samplePath = isProject ? projPath + gGetSlash() + G_Patch_DEPR_.getSamplePath(i) : "";
ch->readPatch_DEPR_(samplePath.c_str(), i);
}
G_Mixer.outVol = G_Patch_DEPR_.getOutVol();
G_Mixer.inVol = G_Patch_DEPR_.getInVol();
G_Mixer.bpm = G_Patch_DEPR_.getBpm();
G_Mixer.bars = G_Patch_DEPR_.getBars();
G_Mixer.beats = G_Patch_DEPR_.getBeats();
G_Mixer.quantize = G_Patch_DEPR_.getQuantize();
G_Mixer.metronome = G_Patch_DEPR_.getMetronome();
G_Patch_DEPR_.lastTakeId = G_Patch_DEPR_.getLastTakeId();
G_Patch_DEPR_.samplerate = G_Patch_DEPR_.getSamplerate();
G_Mixer.rewind();
G_Mixer.updateFrameBars();
G_Mixer.ready = true;
}
示例4:
static int tolua_aps_sound_Mixer_sound_Mixer_rewind00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"Mixer",0,&tolua_err) ||
!tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
Mixer* self = (Mixer*) tolua_tousertype(tolua_S,1,0);
std::string key = ((std::string) tolua_tocppstring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'rewind'", NULL);
#endif
{
self->rewind(key);
}
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'rewind'.",&tolua_err);
return 0;
#endif
}
示例5: mh_loadPatch_DEPR_
void mh_loadPatch_DEPR_(bool isProject, const char *projPath)
{
G_Mixer.init();
G_Mixer.ready = false; // put it in wait mode
int numChans = G_Patch_DEPR_.getNumChans();
for (int i=0; i<numChans; i++) {
Channel *ch = glue_addChannel(G_Patch_DEPR_.getColumn(i), G_Patch_DEPR_.getType(i));
string projectPath = projPath; // safe
string samplePath = isProject ? projectPath + G_SLASH + G_Patch_DEPR_.getSamplePath(i) : "";
ch->readPatch_DEPR_(samplePath.c_str(), i, &G_Patch_DEPR_, G_Conf.samplerate,
G_Conf.rsmpQuality);
}
G_Mixer.outVol = G_Patch_DEPR_.getOutVol();
G_Mixer.inVol = G_Patch_DEPR_.getInVol();
G_Mixer.bpm = G_Patch_DEPR_.getBpm();
G_Mixer.bars = G_Patch_DEPR_.getBars();
G_Mixer.beats = G_Patch_DEPR_.getBeats();
G_Mixer.quantize = G_Patch_DEPR_.getQuantize();
G_Mixer.metronome = G_Patch_DEPR_.getMetronome();
G_Patch_DEPR_.lastTakeId = G_Patch_DEPR_.getLastTakeId();
G_Patch_DEPR_.samplerate = G_Patch_DEPR_.getSamplerate();
/* rewind and update frames in Mixer (it's vital) */
G_Mixer.rewind();
G_Mixer.updateFrameBars();
G_Mixer.ready = true;
}
示例6: 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;
}