本文整理汇总了C++中CAudioManager::GetFilename方法的典型用法代码示例。如果您正苦于以下问题:C++ CAudioManager::GetFilename方法的具体用法?C++ CAudioManager::GetFilename怎么用?C++ CAudioManager::GetFilename使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAudioManager
的用法示例。
在下文中一共展示了CAudioManager::GetFilename方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WinMain
//.........这里部分代码省略.........
else
pLog->Log("Audio system failure!");
//load sounds
pAudio->LoadSample(SOUND_BEEP, "assets\\sounds\\beep-03.wav");
pAudio->LoadSample(SOUND_REMEMBER, "assets\\sounds\\remember.mp3");
pAudio->LoadSample(SOUND_HYMN, "assets\\sounds\\navy_hymn.mp3");
pAudio->LoadSample(SOUND_PERISCOPE, "assets\\sounds\\periscop.wav");
pAudio->LoadSample(SOUND_BUTTON_CLICK, "assets\\sounds\\button_click.wav");
pAudio->LoadSample(SOUND_DEPTH_CHARGE1,"assets\\sounds\\dc1.mp3");
pAudio->LoadSample(SOUND_DEPTH_CHARGE2,"assets\\sounds\\dc2.mp3");
pAudio->LoadSample(SOUND_TORPEDO1,"assets\\sounds\\torpedo3.mp3");
pAudio->LoadSample(SOUND_TORPEDO2,"assets\\sounds\\torpedo4.mp3");
pAudio->LoadSample(SOUND_AMBIENCE1,"assets\\sounds\\ambience1.mp3");
pAudio->LoadSample(SOUND_CLEAR_BRIDGE,"assets\\sounds\\clear_bridge.wav");
pAudio->LoadSample(SOUND_DIVING,"assets\\sounds\\diving.mp3");
pAudio->LoadSample(SOUND_GQ,"assets\\sounds\\general_quarters.wav");
pAudio->LoadSample(SOUND_ANCHORS,"assets\\sounds\\AnchorsAway.mp3");
pAudio->LoadSample(SOUND_TAPS,"assets\\sounds\\Taps.mp3");
pAudio->LoadSample(SOUND_SINKING,"assets\\sounds\\sinking2.mp3");
pAudio->LoadSample(SOUND_ANTHEM,"assets\\sounds\\USA.mp3");
pAudio->LoadSample(SOUND_FUNERAL,"assets\\sounds\\fnrlMrch.wav");
pAudio->LoadSample(SOUND_PING,"assets\\sounds\\sonar1.mp3");
//load stream
pAudio->LoadStream(SOUND_BIO, "assets\\sounds\\fish.mp3");
pAudio->AddStreamClip(SOUND_BIO1, SOUND_BIO, 0, 17708);
pAudio->AddStreamClip(SOUND_BIO2, SOUND_BIO, 17708, 26434);
pAudio->AddStreamClip(SOUND_BIO3, SOUND_BIO, 26434, 42859);
pAudio->AddStreamClip(SOUND_BIO4, SOUND_BIO, 42859, 59541);
pAudio->AddStreamClip(SOUND_BIO5, SOUND_BIO, 59541, 80073);
for(int i = 0; i < pAudio->Size(); i++){
pLog->Log(pAudio->GetFilename(i), i); //write filename and file index to log file
}
}
else{
pLog->Log("Audio disabled");
}
pLog->Log("Main game loop entered!");
::ShowCursor(false);
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Version Number
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Version Number
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Version Number
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Version Number
g_strFPS = "Game Challenge 6 (Chuck Bolin) - \"Sinking of the Rising Sun\", v0.047 Final Version";
::SetWindowText(g_hWnd, g_strFPS.c_str());
double timeDelta;
g_con.InitializePyro();
//Main application loop
//*******************************************************
while (g_bRunning)
{
//Handle messages
if (PeekMessage (&msg,NULL,0,0,PM_REMOVE)){
TranslateMessage (&msg);
DispatchMessage (&msg);
}
else{}
timeDelta = g_LoopTimer.getTimeDifference();
g_pNext = g_pCurrent->update(timeDelta);
if(g_pNext == g_pStateEnd)
g_bRunning = false;