本文整理汇总了C++中Mix_HaltChannel函数的典型用法代码示例。如果您正苦于以下问题:C++ Mix_HaltChannel函数的具体用法?C++ Mix_HaltChannel怎么用?C++ Mix_HaltChannel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Mix_HaltChannel函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
};
开发者ID:flair2005,项目名称:MarinesSaveTheQueen,代码行数:9,代码来源:SoundManager.cpp
示例2: Mix_HaltChannel
void SoundSystem::HaltAllChannels(void)
{
if (!initialized)
return;
Mix_HaltChannel(-1);
for (int i = 0; i < MAX_SOUNDS; i++)
channels[i] = -1;
}
开发者ID:abc00,项目名称:adrian,代码行数:9,代码来源:SoundSystem.cpp
示例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);
}
开发者ID:dorkster,项目名称:espada,代码行数:9,代码来源:main.c
示例4: Mix_HaltChannel
bool Sample::stop()
{
if (m_Channel != -1) {
Mix_HaltChannel(m_Channel);
m_Channel = -1;
return true;
}
return false;
}
开发者ID:GreyGhost,项目名称:OpenAnno-Archive,代码行数:9,代码来源:sample.cpp
示例5: I_StopSound
void I_StopSound (int handle)
{
if(!sound_initialized)
return;
channel_in_use[handle] = -1;
Mix_HaltChannel(handle);
}
开发者ID:JohnnyonFlame,项目名称:odamex,代码行数:9,代码来源:i_sound.cpp
示例6: Mix_HaltChannel
audio::~audio()
{
Mix_HaltChannel(-1);
Mix_HaltMusic();
free_music();
delete sfact;
Mix_CloseAudio();
SDL_QuitSubSystem(SDL_INIT_AUDIO);
}
开发者ID:zurn,项目名称:Zakes,代码行数:9,代码来源:audio.cpp
示例7: stopSound
void stopSound(int channel)
{
if (channel < 0 || game.audio == FALSE || game.sfxDefaultVolume == 0 || channel > MAX_CHANNELS)
{
return;
}
Mix_HaltChannel(channel);
}
开发者ID:LibreGames,项目名称:edgar,代码行数:9,代码来源:audio.c
示例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();
}
开发者ID:hexameron,项目名称:DOOM,代码行数:9,代码来源:l_sound_sdl.c
示例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;
}
}
开发者ID:richi902,项目名称:FurbyKill-3D,代码行数:60,代码来源:x_Game.cpp
示例10: Mix_HaltChannel
void
CGame::StopFuse (void)
{
mStage->RemoveDrawable (mFuse);
// stop fuse sound
if (mFuseChannel >= 0)
Mix_HaltChannel (mFuseChannel);
mFuseChannel = -1;
}
开发者ID:robosolt,项目名称:Gemstone-Miner-Demo,代码行数:10,代码来源:CGame.cpp
示例11: Mix_HaltChannel
Sound::~Sound()
{
Mix_HaltChannel(-1);
for ( Mix_Chunk *c : chunks) {
if ( c == nullptr )
continue;
Mix_FreeChunk(c);
}
Mix_CloseAudio();
}
开发者ID:MaddTheSane,项目名称:maelstrom,代码行数:10,代码来源:sound.cpp
示例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);
}
开发者ID:vectorstorm,项目名称:vectorstorm,代码行数:10,代码来源:VS_SoundSystem.cpp
示例13: PEON_DELETE
void MainApp::onUnloadWorld()
{
PEON_DELETE( m_pFont );
PEON_DELETE( m_pFontTexture );
Mix_HaltChannel( m_iSound );
Mix_FreeChunk( m_pSound );
}
开发者ID:erikyuzwa,项目名称:game-programming-start-to-finish,代码行数:10,代码来源:main.cpp
示例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);
}
}
开发者ID:Bong1236,项目名称:europa,代码行数:10,代码来源:c_soundsystem.cpp
示例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);
}
开发者ID:tcvicio,项目名称:PGE-Project,代码行数:10,代码来源:SdlMusPlayer.cpp
示例16: Mix_HaltChannel
void soundLib::stop_repeated_sfx()
{
//std::cout << ">>>>>> soundLib::stop_repeated_sfx._repeated_sfx_channel: " << _repeated_sfx_channel << std::endl;
if (_repeated_sfx_channel == -1) {
return;
}
Mix_HaltChannel(_repeated_sfx_channel);
_repeated_sfx = -1;
_repeated_sfx_channel = -1;
}
开发者ID:farleyknight,项目名称:rockbot,代码行数:10,代码来源:soundlib.cpp
示例17: snd_halt_chan
void snd_halt_chan(int han, int ms)
{
if (han >= MIX_CHANNELS)
han %= MIX_CHANNELS;
if (ms)
Mix_FadeOutChannel(han, ms);
else {
Mix_HaltChannel(han);
}
}
开发者ID:wimh,项目名称:instead,代码行数:10,代码来源:sound.c
示例18: Mix_HaltChannel
int JukeBox::StopAll() const
{
if (!m_init)
return 0;
const Config* cfg = Config::GetConstInstance();
if (!cfg->GetSoundMusic() && !cfg->GetSoundEffects()) return 0;
// halt playback on all channels
return Mix_HaltChannel(-1);
}
开发者ID:Arnaud474,项目名称:Warmux,代码行数:10,代码来源:jukebox.cpp
示例19: SD_StopDigitized
void SD_StopDigitized(void)
{
DigiPlaying = false;
DigiPriority = 0;
SoundPositioned = false;
if ((DigiMode == sds_PC) && (SoundMode == sdm_PC))
SDL_SoundFinished();
Mix_HaltChannel(-1);
}
开发者ID:JohnnyonFlame,项目名称:ecwolf,代码行数:10,代码来源:id_sd.cpp
示例20: crash
void LevelScene::collectGarbagePlayers()
{
QVector<LVL_Player *> stillVizible;//Avoid camera crash (which uses a cached render list)
while(!dead_players.isEmpty())
{
LVL_Player *corpse = dead_players.last();
dead_players.pop_back();
if(corpse->isInRenderList())
{
stillVizible.push_back(corpse);//Avoid camera crash (which uses a cached render list)
continue;
}
LVL_Player::deathReason reason = corpse->kill_reason;
#if (QT_VERSION >= 0x050400)
players.removeAll(corpse);
#else
//He-he, it's a great workaround for a Qt less than 5.4 which has QVector without removeAll() function
while(1)
{
const QVector<LVL_Player *>::const_iterator ce = players.cend(), cit = std::find(players.cbegin(), ce, corpse);
if (cit == ce)
break;
const QVector<LVL_Player *>::iterator e = players.end(), it = std::remove(players.begin() + (cit - players.cbegin()), e, corpse);
players.erase(it, e);
break;
}
#endif
luaEngine.destoryLuaPlayer(corpse);
switch(reason)
{
case LVL_Player::deathReason::DEAD_burn:
case LVL_Player::deathReason::DEAD_fall:
case LVL_Player::deathReason::DEAD_killed:
if(players.size() > 0)
PGE_Audio::playSoundByRole(obj_sound_role::PlayerDied);
else
{
Mix_HaltChannel(-1);
PGE_Audio::playSoundByRole(obj_sound_role::LevelFailed);
}
break;
}
if(reason==LVL_Player::deathReason::DEAD_burn)
PGE_Audio::playSoundByRole(obj_sound_role::NpcLavaBurn);
}
dead_players.append(stillVizible);
if(players.isEmpty())
{
PGE_MusPlayer::MUS_stopMusic();
setExiting(4000, LvlExit::EXIT_PlayerDeath);
}
}
开发者ID:zigurana,项目名称:PGE-Project,代码行数:55,代码来源:lvl_scene_garbage_collecting.cpp
注:本文中的Mix_HaltChannel函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论