本文整理汇总了C++中Mix_HaltChannel函数的典型用法代码示例。如果您正苦于以下问题:C++ Mix_HaltChannel函数的具体用法?C++ Mix_HaltChannel怎么用?C++ Mix_HaltChannel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Mix_HaltChannel函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Mix_HaltChannel
SoundManager::~SoundManager(){
//Stop all the sounds
Mix_HaltChannel(-1);
//Destroying the background music
destroySound(&m_BackgroundMusic);
destroySound(&m_LaserSound);
destroySound(&m_ZombieSound);
Mix_CloseAudio();
};
示例2: Mix_HaltChannel
void SoundSystem::HaltAllChannels(void)
{
if (!initialized)
return;
Mix_HaltChannel(-1);
for (int i = 0; i < MAX_SOUNDS; i++)
channels[i] = -1;
}
示例3: game_titlescreen
void game_titlescreen()
{
gamestate_over = true;
gamestate_pause = false;
gamestate_title = true;
game_setstatustext("",0);
Mix_FadeOutMusic(sound_fadetime);
Mix_HaltChannel(-1);
}
示例4: Mix_HaltChannel
bool Sample::stop()
{
if (m_Channel != -1) {
Mix_HaltChannel(m_Channel);
m_Channel = -1;
return true;
}
return false;
}
示例5: I_StopSound
void I_StopSound (int handle)
{
if(!sound_initialized)
return;
channel_in_use[handle] = -1;
Mix_HaltChannel(handle);
}
示例6: Mix_HaltChannel
audio::~audio()
{
Mix_HaltChannel(-1);
Mix_HaltMusic();
free_music();
delete sfact;
Mix_CloseAudio();
SDL_QuitSubSystem(SDL_INIT_AUDIO);
}
示例7: stopSound
void stopSound(int channel)
{
if (channel < 0 || game.audio == FALSE || game.sfxDefaultVolume == 0 || channel > MAX_CHANNELS)
{
return;
}
Mix_HaltChannel(channel);
}
示例8: I_ShutdownSound
void I_ShutdownSound(void)
{
int i;
I_ShutdownMusic();
Mix_HaltChannel(-1);
for (i=0 ; i<NUMSFX ; i++)
Mix_FreeChunk( S_sfx[i].chunk );
SDL_CloseAudio();
}
示例9: Mix_HaltChannel
//
// FreeResources
//
void Game::FreeResources()
{
int i;
if(!framework->GetNoSound())
{
Mix_HaltChannel(-1);
Mix_FreeChunk(pickAmmoSnd);
Mix_FreeChunk(killSnd);
Mix_FreeChunk(shootSnd);
Mix_FreeChunk(MGshootSnd);
Mix_FreeChunk(startSnd);
Mix_FreeChunk(PlayerHurt);
Mix_FreeChunk(EnemyHurt);
Mix_FreeChunk(PlayerDead);
Mix_FreeChunk(pickKey);
Mix_FreeChunk(pickHealth);
Mix_FreeChunk(framework->EnemyShoot);
Mix_FreeChunk(framework->ClosingDoor);
Mix_FreeChunk(framework->OpeningDoor);
Mix_FreeChunk(HeartBeat);
Mix_FreeChunk(LVLClear);
Mix_HaltMusic();
Mix_FreeMusic(music1);
}
SDL_FreeSurface(keyImg);
SDL_FreeSurface(fireImg);
SDL_FreeSurface(gunImg);
SDL_FreeSurface(gunHudImg);
SDL_FreeSurface(headRedImg);
SDL_FreeSurface(hudBgImg);
SDL_FreeSurface(headImg);
SDL_FreeSurface(crosshairImg);
SDL_FreeSurface(MGgunHudImg);
SDL_FreeSurface(MGgunImg);
SDL_FreeSurface(MGfireImg);
for(i=0; i<MAX_SPRITES; i++)
{
if(textures[i] != NULL)
SDL_FreeSurface(spriteImgs[i]);
else
break;
}
for(i=0; i<MAX_TEXTURES; i++)
{
if(textures[i][0] != NULL)
{
SDL_FreeSurface(textures[i][0]);
SDL_FreeSurface(textures[i][1]);
}
else
break;
}
}
示例10: Mix_HaltChannel
void
CGame::StopFuse (void)
{
mStage->RemoveDrawable (mFuse);
// stop fuse sound
if (mFuseChannel >= 0)
Mix_HaltChannel (mFuseChannel);
mFuseChannel = -1;
}
示例11: Mix_HaltChannel
Sound::~Sound()
{
Mix_HaltChannel(-1);
for ( Mix_Chunk *c : chunks) {
if ( c == nullptr )
continue;
Mix_FreeChunk(c);
}
Mix_CloseAudio();
}
示例12: StopMusic
void
vsSoundSystem::Deinit()
{
StopMusic();
#if !TARGET_OS_IPHONE
Mix_HaltChannel(-1);
#endif
vsLog(" ++ Sound channels in use: %d", m_channelsInUse);
vsLog(" ++ Max sound channels in use: %d", m_maxChannelsInUse);
}
示例13: PEON_DELETE
void MainApp::onUnloadWorld()
{
PEON_DELETE( m_pFont );
PEON_DELETE( m_pFontTexture );
Mix_HaltChannel( m_iSound );
Mix_FreeChunk( m_pSound );
}
示例14: Mix_HaltChannel
void C_SoundSystem::UnloadSound(Mix_Chunk* sound)
{
if (sound) {
if(Mix_Playing(-1) != 0) {
Mix_HaltChannel(-1); //TODO: Should only stop the channel the sound is playing on
}
Mix_FreeChunk(sound);
}
}
示例15: Mix_HaltChannel
void PGE_Sounds::clearSoundBuffer()
{
Mix_HaltChannel(-1);
for (QHash<QString, Mix_Chunk* >::iterator it=chunksBuffer.begin(); it!=chunksBuffer.end(); ++it)
{
Mix_FreeChunk((*it));
}
chunksBuffer.clear();
Mix_ReserveChannels(0);
}