irrklang::ISound* CSoundManager::playWithFeedback( const core::vector3df origin, const std::string& event ) { ISoundSource* sound = container->getSound(event); if(!sound) //! \todo weitere errormöglichkeiten! return nullptr; sound->setDefaultVolume(0.0); sound->setDefaultMinDistance(250); return engine->play3D(sound, conv(origin), false, false, true); }
// ********************************************************************************* // PLAY - FUNCTIONS // -------------------- bool CSoundManager::play(const core::vector3df& origin, const std::string& event) { ISoundSource* sound = container->getSound(event); if(!sound) //! \todo weitere errormöglichkeiten! return false; sound->setDefaultVolume(1.0); sound->setDefaultMinDistance(250); engine->play3D(sound, conv(origin)); return true; }
ISoundSource *World::AddSoundSource() { ISoundSource *ss = new SoundSource(engine->GetSoundSystem()); AddTransformable(ss); ss->drop(); // Maybe start it paused if (IsPaused()) ss->Pause(); return ss; }
int Arpe::playActionAudio(iPoint* value){ if( strcmp( (*(*value).actualAction).audioFilename,"") != 0) { if( (*(*value).actualAction).audioOverplay == false) this->audioEngine->stopAllSounds(); if( value->actualAction->audio3D ){ ISoundSource* as = this->audioEngine->addSoundSourceFromFile(value->actualAction->audioFilename); vec3df pos(value->actualAction->x,value->actualAction->y,value->actualAction->z); as->setDefaultVolume(value->actualAction->mathValue2); this->audioEngine->play3D(as,pos); } else{ this->audioEngine->play2D((*(*value).actualAction).audioFilename); } return 1; } return 0; }