本文整理汇总了C++中fmod::System::setOutputByPlugin方法的典型用法代码示例。如果您正苦于以下问题:C++ System::setOutputByPlugin方法的具体用法?C++ System::setOutputByPlugin怎么用?C++ System::setOutputByPlugin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fmod::System
的用法示例。
在下文中一共展示了System::setOutputByPlugin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
ERRCHECK(result);
printf("%2d - %-30s", count + 1, name);
if (count % 2)
{
printf("\n");
}
}
if (count % 2)
{
printf("\n");
}
}
/*
System initialization
*/
printf("-----------------------------------------------------------------------\n"); // print driver names
printf("Press a corresponding number for an OUTPUT PLUGIN to use or ESC to quit\n");
do
{
key = _getch();
} while (key != 27 && key < '1' && key > '0' + numoutputplugins);
if (key == 27)
{
return 0;
}
result = system->getPluginHandle(FMOD_PLUGINTYPE_OUTPUT, key - '1', &handle);
ERRCHECK(result);
result = system->setOutputByPlugin(handle);
ERRCHECK(result);
int drivers;
result = system->getNumDrivers(&drivers);
ERRCHECK(result);
result = system->init(32, FMOD_INIT_NORMAL, 0);
ERRCHECK(result);
result = system->createSound("../media/wave.mp3", FMOD_SOFTWARE | FMOD_CREATESTREAM, 0, &sound);
ERRCHECK(result);
printf("Press a key to play sound to output device.\n");
result = system->playSound(FMOD_CHANNEL_FREE, sound, 0, &channel);
ERRCHECK(result);
/*
Main loop.
*/
do
{
unsigned int ms = 0;
unsigned int lenms = 0;
bool paused = false;
int channelsplaying = 0;
FMOD::Sound *currentsound = 0;
system->update();
playing = false;