本文整理汇总了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;
}
示例2: CleanUp
static void CleanUp(void)
{
if ( wave ) {
Mix_FreeChunk(wave);
wave = NULL;
}
if ( audio_open ) {
Mix_CloseAudio();
audio_open = 0;
}
SDL_Quit();
}
示例3: cleanSound
void cleanSound()
{
Sint32 i;
stopSound();
for (i=0;i<20;i++)
if (samples[i])
Mix_FreeChunk(samples[i]);
Mix_CloseAudio();
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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);
}
示例11: FreeSound
void FreeSound(Sound *sound)
{
if(sound->used > 1)
{
sound->used--;
return;
}
NumSounds--;
sound->used--;
Mix_FreeChunk(sound->sound);
sound->sound = NULL;
}
示例12: freeSounds
void freeSounds()
{
int i;
for (i=0;i<MAX_SOUNDS;i++)
{
if (sound[i].effect != NULL)
{
Mix_FreeChunk(sound[i].effect);
}
}
}
示例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();
}
示例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();
}
示例15: stop
Sound::~Sound()
{
if(sound != NULL)
{
if(ownsChannel(this, playingChannel))
{
stop();
}
Mix_FreeChunk(sound);
}
}