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


C++ Mix_FreeChunk函数代码示例

本文整理汇总了C++中Mix_FreeChunk函数的典型用法代码示例。如果您正苦于以下问题:C++ Mix_FreeChunk函数的具体用法?C++ Mix_FreeChunk怎么用?C++ Mix_FreeChunk使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Mix_FreeChunk函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: TTF_CloseFont

void MainState::close()
{
	mPlayer1Texture.free();
	mPlayer2Texture.free();
	mBallTexture.free();

	mPlayer1ScoreTextTexture.free();
	mPlayer2ScoreTextTexture.free();

	mPlayer1Sprite.free();
	mPlayer2Sprite.free();
	mBallSprite.free();

	TTF_CloseFont(mFont);
	mFont = NULL;

	Mix_FreeChunk(mPaddleHitSound);
	Mix_FreeChunk(mWallHitSound);
	mPaddleHitSound = NULL;
	mWallHitSound = NULL;
}
开发者ID:nwforrer,项目名称:pong,代码行数:21,代码来源:MainState.cpp

示例2: CleanUp

static void CleanUp(void)
{
	if ( wave ) {
		Mix_FreeChunk(wave);
		wave = NULL;
	}
	if ( audio_open ) {
		Mix_CloseAudio();
		audio_open = 0;
	}
	SDL_Quit();
}
开发者ID:Sgt-Nukem,项目名称:chocolate_duke3D,代码行数:12,代码来源:playwave.c

示例3: cleanSound

void cleanSound()
{
    Sint32 i;
    
    stopSound();
    
    for (i=0;i<20;i++)
       if (samples[i])
          Mix_FreeChunk(samples[i]);
    
    Mix_CloseAudio();
}
开发者ID:krayon,项目名称:hopyone,代码行数:12,代码来源:sound.c

示例4: delete

ResourceManager::~ResourceManager()
{
	map<string, Surface *>::iterator si;
	for (si = m_images.begin(); si != m_images.end(); si++)
		delete (*si).second;
	map<string, Mix_Chunk *>::iterator ci;
	for (ci = m_chunk.begin(); ci != m_chunk.end(); ci++)
		Mix_FreeChunk((*ci).second);
	map<string, Mix_Music *>::iterator mi;
	for (mi = m_music.begin(); mi != m_music.end(); mi++)
		Mix_FreeMusic((*mi).second);
}
开发者ID:kotrenn,项目名称:ludum22,代码行数:12,代码来源:resourcemanager.cpp

示例5: Mix_FreeChunk

	void Sound::quit()	{
		for(s_mpi = s_mpSound.begin(); s_mpi != s_mpSound.end(); ++s_mpi) {
			if(s_mpi->second.chunk) {
				Mix_FreeChunk(s_mpi->second.chunk);
				s_mpi->second.chunk = NULL;
			}
		}
		s_mpSound.clear();
		s_mpSoundChannel.clear();
		s_mpSoundPlaying.clear();
		ROE_SAFE_DELETE_ARRAY(s_abChannelPlaying);
	}
开发者ID:swantescholz,项目名称:coding,代码行数:12,代码来源:RoeSound.cpp

示例6: LOG

bool ModuleSound::CleanUp()
{
	LOG("Freeing music");

	for (std::list<Mix_Music*>::iterator it = Lmusic.begin(); it != Lmusic.end(); ++it)
		Mix_FreeMusic(*it);
	for (std::list<Mix_Chunk*>::iterator it = Lsoundse.begin(); it != Lsoundse.end(); ++it)
		Mix_FreeChunk(*it);
	Lsoundse.clear();
	Lmusic.clear();
	return true;
}
开发者ID:LigthVirus,项目名称:SDLGAME1,代码行数:12,代码来源:ModuleSound.cpp

示例7: Mix_FreeMusic

ContentManager::~ContentManager()
{
	for(map<string, Mix_Music*>::const_iterator iter = m_p_Music.begin(); iter != m_p_Music.end(); ++iter)
	{
		Mix_FreeMusic(iter->second);
	}

	for(map<string, Mix_Chunk*>::const_iterator iter = m_p_SoundEffects.begin(); iter != m_p_SoundEffects.end(); ++iter)
	{
		Mix_FreeChunk(iter->second);
	}
}
开发者ID:Zieroc,项目名称:SDL_TextBasedGame,代码行数:12,代码来源:ContentManager.cpp

示例8: Mix_FreeChunk

void Sound::destroy(){
    if (own){
        *own -= 1;
        if ( *own == 0 ){
            delete own;
            if (data.chunk != NULL){
                Mix_FreeChunk(data.chunk);
            }
            own = NULL;
        }
    }
}
开发者ID:boyjimeking,项目名称:paintown,代码行数:12,代码来源:sound.cpp

示例9: Mix_FreeChunk

void cSound_PC::MixerChannelFinished( int32 pChannel ) {

	for (std::vector<sVocPlaying>::iterator ChannelIT = mMixerChunks.begin(); ChannelIT != mMixerChunks.end(); ++ChannelIT) {
		
		if (ChannelIT->mChannel == pChannel) {
			Mix_FreeChunk( ChannelIT->mCurrentChunk );

			mMixerChunks.erase( ChannelIT );
			return;
		}
	}
}
开发者ID:carriercomm,项目名称:openfodder,代码行数:12,代码来源:Sound_PC.cpp

示例10: it

	~SDLSoundData()
	{
		QMutableMapIterator<int, SDLSoundData*> it(*channelsMap());
		while (it.hasNext()) {
			it.next();
			if (it.value() == this) {
				Mix_HaltChannel(it.key());
				it.remove();
			}
		}
		Mix_FreeChunk(chunk);
	}
开发者ID:AlexeyProkhin,项目名称:qutim,代码行数:12,代码来源:sdlbackend.cpp

示例11: FreeSound

void FreeSound(Sound *sound)
{
  if(sound->used > 1)
  {
    sound->used--;
    return;
  }
  NumSounds--;
  sound->used--;
  Mix_FreeChunk(sound->sound);
  sound->sound = NULL;
}
开发者ID:Hrishi29x,项目名称:abyss,代码行数:12,代码来源:audio.cpp

示例12: freeSounds

void freeSounds()
{
	int i;
	
	for (i=0;i<MAX_SOUNDS;i++)
	{
		if (sound[i].effect != NULL)
		{
			Mix_FreeChunk(sound[i].effect);
		}
	}
}
开发者ID:Pentium44,项目名称:Maetrox,代码行数:12,代码来源:audio.c

示例13: clean_up

void clean_up()
{
  //Free the images
  SDL_FreeSurface(background);

  Mix_FreeChunk(scratch);
  Mix_FreeChunk(high);
  Mix_FreeChunk(med);
  Mix_FreeChunk(low);

  Mix_FreeMusic(music);

  Mix_CloseAudio();

  TTF_CloseFont(font);

  TTF_Quit();

  //Quit SDL
  SDL_Quit();
}
开发者ID:Foest,项目名称:sdl,代码行数:21,代码来源:sounds.cpp

示例14: sound_free

void sound_free( void ) {
	int i;
	
	for( i = 0 ; i < NUM_SOUNDS ; i++ ) {
		if( sounds[i] ) {
			Mix_FreeChunk( sounds[i] );
			sounds[i] = NULL;
		}
	}

	sound_close_mixer();
}
开发者ID:psychomantys,项目名称:cabrio,代码行数:12,代码来源:sound.c

示例15: stop

Sound::~Sound()
{
   if(sound != NULL)
   {
      if(ownsChannel(this, playingChannel))
      {
         stop();
      }

      Mix_FreeChunk(sound);
   }
}
开发者ID:linwang,项目名称:EDEn,代码行数:12,代码来源:Sound.cpp


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