Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4200 in orxonox.OLD for orxonox/branches/openAL/src/lib/sound


Ignore:
Timestamp:
May 16, 2005, 11:46:23 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/openAL: rolloffFactor

Location:
orxonox/branches/openAL/src/lib/sound
Files:
2 edited

Legend:

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

    r4198 r4200  
    7474  //  alSourcefv(sourceID, AL_POSITION, SourcePos);
    7575  //  alSourcefv(sourceID, AL_VELOCITY, SourceVel);
    76    alSourcei (sourceID, AL_LOOPING,  true     );
    77  
    78 
     76  alSourcei (sourceID, AL_LOOPING,  true     );
    7977}
    8078
     
    9896  alSourcePause(this->sourceID);
    9997}
     98
     99void SoundSource::setRolloffFactor(ALfloat rolloffFactor)
     100{
     101  alSourcef(this->sourceID, AL_ROLLOFF_FACTOR, rolloffFactor);
     102}
     103
    100104
    101105
     
    221225  alutInit(NULL, 0);
    222226  alGetError();
    223 }
    224 
     227
     228  alDopplerFactor(SOUND_DOPPLER_FACTOR);
     229  alDopplerVelocity(SOUND_DOPPLER_VELOCITY);
     230}
     231
  • orxonox/branches/openAL/src/lib/sound/sound_engine.h

    r4197 r4200  
    1010#include "base_object.h"
    1111#include "alincl.h"
     12
     13
     14#define SOUND_DOPPLER_FACTOR     0.1
     15#define SOUND_DOPPLER_VELOCITY   500000000
    1216
    1317// FORWARD DEFINITION
     
    4347  void stop();
    4448  void pause();
    45  
    4649
    4750  // development functions
     
    5053  /** \returns the SourceNode of this Source */
    5154  inline PNode* getNode(void) { return this->sourceNode;}
     55
     56  void setRolloffFactor(ALfloat rolloffFactor);
    5257
    5358 private:
Note: See TracChangeset for help on using the changeset viewer.