本文整理汇总了C++中CAudioManager::SetSystemFactors方法的典型用法代码示例。如果您正苦于以下问题:C++ CAudioManager::SetSystemFactors方法的具体用法?C++ CAudioManager::SetSystemFactors怎么用?C++ CAudioManager::SetSystemFactors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAudioManager
的用法示例。
在下文中一共展示了CAudioManager::SetSystemFactors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WinMain
//.........这里部分代码省略.........
//game timer for update
CTimer timerGame;
timerGame.Initialize();
//define events for changing game states
//*************************************************************************
//g_pStateIntro->AddTransitionEvent(EVENT_GO_PLAY1, g_pStatePlay1);
//g_pStatePlay1->AddTransitionEvent(EVENT_GO_CREDITS, g_pStateCredits);
g_pStateIntro->AddTransitionEvent(EVENT_GO_MAIN, g_pStateMain);
g_pStateMain->AddTransitionEvent(EVENT_GO_PLAY1, g_pStatePlay1);
//g_pStateMain->AddTransitionEvent(EVENT_GO_HELP, g_pStateHelp);
//g_pStateMain->AddTransitionEvent(EVENT_GO_CREDITS, g_pStateCredits);
g_pStatePlay1->AddTransitionEvent(EVENT_GO_CREDITS, g_pStateCredits);
//g_pStatePlay1->AddTransitionEvent(EVENT_GO_QUIT, g_pStateQuit);
//g_pStatePlay1->AddTransitionEvent(EVENT_GO_MAIN, g_pStateMain);
g_pStateHelp->AddTransitionEvent(EVENT_GO_MAIN, g_pStateMain);
g_pStateCredits->AddTransitionEvent(EVENT_GO_QUIT, g_pStateQuit);
g_pCurrent = g_pStateIntro;//g_pStatePlay1;
//************************************** S O U N D ************************
//initialize sound manager
//audio setup
CAudioManager *pAudio = CAudioManager::Instance();
/*
if(pAudio->LoadAudioData("assets\\data\\sounds.dat") == true)
pLog->Log("Audio files have loaded successfully!");
else
pLog->Log("Audio files have failed to load!");
*/
pAudio->SetPlayerPosition(1000, 0, 1000);
pAudio->SetSystemFactors(1, 1, 1);
/*
pAudio->AddNoiseSource(0, 0, 10, 0, 41, 0, 32, -1, 0.25);
pAudio->AddNoiseSource(1, 1, 14, 0, 35, 0, 32, -1, 0.25);
pAudio->AddNoiseSource(2, 2, 10, 0, 30, 0, 32, -1, 0.25);
pAudio->AddNoiseSource(3, 3, 20, 0, 15, 0, 32, -1, 0.25);
pAudio->AddNoiseSource(4, 4, 29, 0, 15, 0, 32, -1, 0.25);
pAudio->AddNoiseSource(5, 5, 30, 0, 5, 0, 32, -1, 0.25);
pAudio->AddNoiseSource(6, 6, 40, 0, 10, 0, 32, -1, 0.25);
pAudio->AddNoiseSource(7, 7, 35, 0, 35, 0, 32, -1, 0.25);
pAudio->AddNoiseSource(8, 8, 27, 0, 27, 0, 32, -1, 0.25);
pAudio->AddNoiseSource(9, 9, 26, 0, 26, 0, 32, -1, 0.25);
pAudio->AddNoiseSource(10, 10, 26, 0, 26, 0, 250, -1, 10.0);
pAudio->AddNoiseSource(11, 11, 26, 0, 26, 0, 250, -1, 0.25);
pAudio->AddNoiseSource(12, 12, 45, 0, 45, 0, 500, -1, 0.25);
*/
// enter the main loop
//************************************** M A I N L O O P *****************
MSG msg;
pLog->Log("Entering Main Control Loop");
float timeDiff = 0.0f;
g_pCurrent->Activate(gameData, cfg, con);
int iLost = 0;
//*********************
// PYRO
//con.InitializePyro();
while(g_bRunning)
{
DWORD starting_point = GetTickCount();
::Sleep(1);
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))