本文整理汇总了C++中fmod::DSP::getActive方法的典型用法代码示例。如果您正苦于以下问题:C++ DSP::getActive方法的具体用法?C++ DSP::getActive怎么用?C++ DSP::getActive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fmod::DSP
的用法示例。
在下文中一共展示了DSP::getActive方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
result = dsppitch->setParameter(FMOD_DSP_PITCHSHIFT_PITCH, pitch);
ERRCHECK(result);
lineCount++;
//printf("Line Count: %d \n", lineCount);
break;
}
if (line.compare("left") == 0){
result = channel[0]->setSpeakerMix(1.0f, 0, 0, 0, 0, 0, 0, 0);
ERRCHECK(result);
lineCount++;
//printf("Line Count: %d \n", lineCount);
break;
}
if (line.compare("right") == 0){
result = channel[0]->setSpeakerMix(0, 1.0f, 0, 0, 0, 0, 0, 0);
ERRCHECK(result);
lineCount++;
//printf("Line Count: %d \n", lineCount);
break;
}
if (line.compare("forward") == 0){
result = channel[0]->setSpeakerMix(1.0f, 1.0f, 0, 0, 0, 0, 0, 0);
ERRCHECK(result);
lineCount++;
//printf("Line Count: %d \n", lineCount);
break;
}
if (line.compare("pitch") == 0){
bool active;
result = dsppitch->getActive(&active);
ERRCHECK(result);
if (active)
{
result = dsppitch->remove();
ERRCHECK(result);
}
else
{
result = system->addDSP(dsppitch, 0);
ERRCHECK(result);
result = dsppitch->setParameter(FMOD_DSP_PITCHSHIFT_PITCH, 1.2f);
ERRCHECK(result);
}
lineCount++;
break;
}
if (line.compare("pause") == 0){
bool paused;
channel[0]->getPaused(&paused);
ERRCHECK(result);
paused = !paused;
result = channel[0]->setPaused(paused);
ERRCHECK(result);
lineCount++;
示例2: main
//.........这里部分代码省略.........
result = system->createDSPByType(FMOD_DSP_TYPE_CHORUS, &dspchorus);
ERRCHECK(result);
result = system->createDSPByType(FMOD_DSP_TYPE_PARAMEQ, &dspparameq);
ERRCHECK(result);
/*
Main loop.
*/
do
{
if (kbhit())
{
key = getch();
switch (key)
{
case ' ' :
{
bool paused;
channel->getPaused(&paused);
ERRCHECK(result);
paused = !paused;
result = channel->setPaused(paused);
ERRCHECK(result);
break;
}
case '1' :
{
bool active;
result = dsplowpass->getActive(&active);
ERRCHECK(result);
if (active)
{
result = dsplowpass->remove();
ERRCHECK(result);
}
else
{
result = system->addDSP(dsplowpass, 0);
ERRCHECK(result);
}
break;
}
case '2' :
{
bool active;
result = dsphighpass->getActive(&active);
ERRCHECK(result);
if (active)
{
result = dsphighpass->remove();
ERRCHECK(result);
}
else
{
result = system->addDSP(dsphighpass, 0);
ERRCHECK(result);
}
break;