Mercurial > fife-parpg
diff engine/core/audio/soundemitter.i @ 173:454ed60ad7b2
* Added a setRoleoff() function to the SoundEmitter class
This function sets AL_ROLEOFF_FACTOR. Rolloff factor judges the strength of attenuation over distance.
It effect's the volume of the emitter over distance to the listener. You'll have to do plenty
of testing to find a good value.
author | nihathrael@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 24 Jan 2009 22:26:46 +0000 |
parents | 90005975cdbb |
children | 362fe23920b9 |
line wrap: on
line diff
--- a/engine/core/audio/soundemitter.i Thu Jan 22 15:35:22 2009 +0000 +++ b/engine/core/audio/soundemitter.i Sat Jan 24 22:26:46 2009 +0000 @@ -36,33 +36,34 @@ class SoundManager; class SoundClipPool; - + class SoundEmitter { public: SoundEmitter(SoundManager* manager, SoundClipPool* pool, unsigned int uid); ~SoundEmitter(); - + unsigned int getID(); - + void setSoundClip(unsigned int sound_id); void reset(bool defaultall = false); void release(); - + void play(); void pause(); void stop(); - + void setLooping(bool loop); + void setRoleoff(float roleoff); void setPositioning(bool relative); void setPosition(float x, float y, float z); void setVelocity(float x, float y, float z); void setGain(float gain); float getGain(); - + bool isStereo(); short getBitResolution(); unsigned long getSampleRate(); - + void setCursor(SoundPositionType type, float value); float getCursor(SoundPositionType type); };