Esempio n. 1
0
/* Unloads a sound with the specified id
 */
void iOSSoundSystem::OnUnloadSound(uint32 soundID)
{
#if !TARGET_IPHONE_SIMULATOR	
	SoundMap::iterator it = mSounds.find(soundID);
	if(it == mSounds.end())
		return;
	
	SoundEngine_UnloadEffect(it->second);
	mSounds.erase(it);
#endif
}
Esempio n. 2
0
/* Virtual Destructor
 */
iOSSoundSystem::~iOSSoundSystem(void)
{
#if !TARGET_IPHONE_SIMULATOR	
	SoundMap::iterator it = mSounds.begin();
	
	for(; it != mSounds.end(); it++)
		SoundEngine_UnloadEffect(it->second);
#endif
		
	mSounds.clear();
}
void ofxOpenALSoundPlayer::unload() {
	if(bLoadedOk)
	{
		if ( isPlaying() )
			stop();
		
		bLoadedOk=false;
		if(iAmAnMp3)
			unloadAllBackgroundMusic();
		else
			SoundEngine_UnloadEffect(myId);
	}
}