Пример #1
0
/* Plays a sound at the specified volume
 */
void iOSSoundSystem::OnPlaySound(uint32 soundID, float volume)
{
#if !TARGET_IPHONE_SIMULATOR	
	SoundMap::iterator it = mSounds.find(soundID);
	if(it == mSounds.end())
		return;
	
	SoundEngine_SetEffectLevel(it->second, volume/100.0f);
	SoundEngine_StartEffect(it->second);
#endif
} 
Пример #2
0
void RudeSound::PlayWave(eSoundEffect num)
{
	if(num == kSoundNone)
		return;
	
#if 0
	int result = SoundEngine_StartEffect(m_soundids[num]);
	//RUDE_ASSERT(result == noErr, "Could not play effect (result = %d)\n", result);
#endif
	
#if defined(RUDE_IPHONE) || defined(RUDE_MACOS)
	AudioServicesPlaySystemSound(m_soundids[num]);
#endif

}
void ofxOpenALSoundPlayer::play() {
	
	if ( !bLoadedOk ) 
		return;
	
	if(iAmAnMp3)
		SoundEngine_StartBackgroundMusic();
	else
	{
		if(myPrimedId==-1 || bMultiPlay)
			prime();
		SoundEngine_StartEffect(myPrimedId);
	}
	
	stopped = false;
}