Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4208 in orxonox.OLD for orxonox/branches/openAL/src


Ignore:
Timestamp:
May 17, 2005, 3:36:42 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/openAL: shoots now have a cool sound

Location:
orxonox/branches/openAL/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/openAL/src/lib/sound/sound_engine.cc

    r4207 r4208  
    9595  alSourcef (this->sourceID, AL_PITCH,    1.0      );
    9696  alSourcef (this->sourceID, AL_GAIN,     1.0      );
    97   alSourcei (sourceID, AL_LOOPING,  true     );
     97  alSourcei (sourceID, AL_LOOPING,  AL_FALSE     );
    9898}
    9999
  • orxonox/branches/openAL/src/story_entities/world.cc

    r4205 r4208  
    490490
    491491  SoundEngine::getInstance()->setListener(tn);
    492   SoundSource* tSound = SoundEngine::getInstance()->createSource("sound/explo.wav", this->localPlayer);
    493   tSound->setRolloffFactor(0);
    494   tSound->play();
    495 
    496492
    497493  ParticleSystem* system = new ParticleSystem(1000, PARTICLE_SPRITE);
  • orxonox/branches/openAL/src/world_entities/test_gun.cc

    r4194 r4208  
    3131#include "list.h"
    3232#include "animation3d.h"
     33#include "sound_engine.h"
    3334
    3435using namespace std;
     
    8687      this->animation3->addKeyFrame(Vector(-2.6, 0.1, -2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
    8788    }
    88 
     89 
     90  this->fireSound = (SoundBuffer*)ResourceManager::getInstance()->load("sound/explo.wav", WAV);
     91  this->weaponSource = new SoundSource(this->fireSound, this);
    8992}
    9093
     
    137140      return;
    138141    }
     142
     143  weaponSource->play();
    139144
    140145  Projectile* pj = new TestBullet(this);
  • orxonox/branches/openAL/src/world_entities/weapon.h

    r3888 r4208  
    175175  int leftRight;   // this will become an enum
    176176
     177  SoundBuffer* fireSound;
     178  SoundSource* weaponSource;
     179
     180
    177181 private:
    178182  bool enabled;                    //<! states if the weapon is enabled or not
  • orxonox/branches/openAL/src/world_entities/world_entity.h

    r4194 r4208  
    1111#include "resource_manager.h"
    1212
    13 
    1413//class CollisionCluster;
    1514class CharacterAttributes;
    1615class Model;
    17 
     16class SoundEngine;
     17class SoundBuffer;
     18class SoundSource;
    1819
    1920//! Basic class from which all interactive stuff in the world is derived from
Note: See TracChangeset for help on using the changeset viewer.