当前位置: 首页>>代码示例>>C++>>正文


C++ Mix_HaltChannel函数代码示例

本文整理汇总了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();
 };
开发者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


注:本文中的Mix_HaltChannel函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。