本文整理汇总了C++中CAudioManager::StopSoundClip方法的典型用法代码示例。如果您正苦于以下问题:C++ CAudioManager::StopSoundClip方法的具体用法?C++ CAudioManager::StopSoundClip怎么用?C++ CAudioManager::StopSoundClip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAudioManager
的用法示例。
在下文中一共展示了CAudioManager::StopSoundClip方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//********************************************************************
// main()
//********************************************************************
int main(){
//instantiate log object and log
CLog *pLog = CLog::Instance();
pLog->Log("*********************************************************");
pLog->Log("Program starting..................");
pLog->SetDelimiter(':');
pLog->LogDate();
pLog->LogTime();
pLog->Log("************************ *********************************");
cout << "Enter name: ";
cin >> g_playerName;
//system("cls");
//initialize console
Console con(80, 25);//50);
con.SetConsolePosition(0,0);
con.CenterConsoleWindow();
con.cls();
Initialize();
CONSOLE_SCREEN_BUFFER_INFO csbi = con.GetScreenBufferInfo();
pLog->LogPair("Screen Buffer Size",csbi.dwSize.X, csbi.dwSize.Y);
pLog->LogPair("Window Size",csbi.dwMaximumWindowSize.X, csbi.dwMaximumWindowSize.Y);
pLog->LogPair("Left-Top",csbi.srWindow.Left, csbi.srWindow.Top);
pLog->LogPair("Right-Bottom",csbi.srWindow.Right, csbi.srWindow.Bottom);
pLog->LogPair("Maximum Window Size", csbi.dwMaximumWindowSize.X, csbi.dwMaximumWindowSize.Y);
COORD maxSize = con.GetMaximumScreenSize();
pLog->LogPair("Max Size",maxSize.X, maxSize.Y);
//game timer
CTimer loopTimer;
CTimer renderTimer;
loopTimer.Initialize();
renderTimer.Initialize();
double timeDelta = 0;
char buffer[] = "Chuck's Factory Game";
con.setTitle(buffer);
//main game loop
//********************************************
bool quit = false;
while(!quit){
timeDelta = loopTimer.GetTimeDifference();
g_pNext = g_pCurrent->Update(timeDelta);
if(NULL != g_pNext)
{
g_pCurrent = g_pNext;
}
if(g_pCurrent == g_pStateQuit )
quit = true;
// Render our current game object
//if(renderTimer.GetTimer(0.1)== true)
g_pCurrent->Render(con);
}
//********************************************
//end game loop
//free resources
delete g_pStateIntro;
delete g_pStateMenu;
delete g_pStateQuit;
delete g_pStateRules;
delete g_pStateScore;
delete g_pStatePlay;
for(int i = 0; i < 9; ++i)
g_audio.StopSoundClip(i);
system("cls");
//normal termination of game
pLog->Log("*********************************************************");
pLog->Log("Program terminating normally..................");
pLog->SetDelimiter(':');
pLog->LogTime();
pLog->Log("*********************************************************");
return 0;
}