本文整理汇总了C++中Mix_FreeChunk函数的典型用法代码示例。如果您正苦于以下问题:C++ Mix_FreeChunk函数的具体用法?C++ Mix_FreeChunk怎么用?C++ Mix_FreeChunk使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Mix_FreeChunk函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: cleanStatus
FFDemo::~FFDemo()
{
cleanStatus();
cleanAbout();
cleanItems();
cleanMagicSkills();
cleanMain();
delete mSplashImage;
delete mTimeLabel1;
delete mTimeLabel2;
delete mTime;
delete mGoldFootstepsInfo1;
delete mGoldFootstepsInfo2;
delete mGoldFootsteps;
delete mMenuList;
delete mMenuListModel;
delete mMenu;
delete mMain;
delete mFontWhite;
delete mFontCyan;
delete mTop;
delete mGui;
delete mSDLInput;
delete mSDLGraphics;
delete mSDLImageLoader;
Mix_FreeChunk(mChooseSound);
Mix_FreeChunk(mEscapeSound);
Mix_CloseAudio();
SDL_Quit();
}
开发者ID:Beliaar,项目名称:fifechan,代码行数:40,代码来源:ffdemo.cpp
示例17: Mix_FreeChunk
Vista::~Vista() {
this->barra->closeFont();
Mix_FreeChunk( musica_creacion );
SDL_DestroyTexture(backgroundTexture);
SDL_DestroyTexture(perdedorTexture);
SDL_DestroyTexture(ganadorElfosTexture);
SDL_DestroyTexture(ganadorHobbitTexture);
SDL_DestroyTexture(ganadorMordorTexture);
TTF_Quit();
SDL_DestroyRenderer(gRenderer);
SDL_DestroyWindow(gWindow);
Mix_FreeChunk( musicaLoading );
Mix_FreeChunk( music_ganador_elfo );
Mix_FreeChunk( musica_ganador_hobbit );
Mix_FreeChunk( musica_ganador_humanos );
Mix_FreeChunk( musica_ganador_mordor );
Mix_CloseAudio();
gWindow = NULL;
gRenderer = NULL;
IMG_Quit();
SDL_Quit();
}
开发者ID:AndresOtero,项目名称:AgeOfEmpiresTaller,代码行数:25,代码来源:Vista.cpp
示例18: BGS_Play
///////////////////////////////////////////////////////////
// BGS play
///////////////////////////////////////////////////////////
void Audio::BGS_Play(std::string file, int volume, int pitch) {
std::string path = FileFinder::FindMusic(file);
if (path.empty()) ARGSS::AError::FileNotFound(file);
if (bgs != NULL) Mix_FreeChunk(bgs);
bgs = Mix_LoadWAV(path.c_str());
if (!bgs) ARGSS::AError::AudioNotLoad("BGS", file, Mix_GetError());
bgs_channel = Mix_PlayChannel(-1, bgs, -1);
Mix_Volume(bgs_channel, volume * MIX_MAX_VOLUME / 100);
if (bgs_channel == -1) ARGSS::AError::AudioNotPlay("BGS", file, Mix_GetError());
}
开发者ID:cstrahan,项目名称:argss,代码行数:16,代码来源:audio_sdl.cpp
示例19: sound_cleanup
void sound_cleanup (void) {
int i;
/* Free the sound effects */
for (i = 0; i < NUM_WAVES; i++)
Mix_FreeChunk(sounds[i]);
/* Quit SDL_mixer */
Mix_CloseAudio();
/* Quit SDL */ /* Oh boy, what a meaningful comment! */
SDL_Quit();
}
开发者ID:hhirsch,项目名称:netrek,代码行数:13,代码来源:sound.c
示例20: clean_up
bool clean_up() {
// WARNING: Assumes all these are the same
for (int i=0;i<MAX_BITMAPS;i++) {
if (FONTS[i] != NULL) {
SDL_FreeSurface(BITMAPS[i]);
Mix_FreeChunk(SOUNDS[i]);
TTF_CloseFont(FONTS[i]);
}
}
SDL_FreeSurface(MAIN_SCREEN); // this is important and needs to stay
return true;
}
开发者ID:AbuDhabi,项目名称:Fighter,代码行数:13,代码来源:load_media.cpp
注:本文中的Mix_FreeChunk函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论