Mercurial > fife-parpg
comparison 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 |
comparison
equal
deleted
inserted
replaced
172:3fe0e68f4269 | 173:454ed60ad7b2 |
---|---|
34 | 34 |
35 class SoundDecoder; | 35 class SoundDecoder; |
36 class SoundManager; | 36 class SoundManager; |
37 class SoundClipPool; | 37 class SoundClipPool; |
38 | 38 |
39 | 39 |
40 class SoundEmitter { | 40 class SoundEmitter { |
41 public: | 41 public: |
42 SoundEmitter(SoundManager* manager, SoundClipPool* pool, unsigned int uid); | 42 SoundEmitter(SoundManager* manager, SoundClipPool* pool, unsigned int uid); |
43 ~SoundEmitter(); | 43 ~SoundEmitter(); |
44 | 44 |
45 unsigned int getID(); | 45 unsigned int getID(); |
46 | 46 |
47 void setSoundClip(unsigned int sound_id); | 47 void setSoundClip(unsigned int sound_id); |
48 void reset(bool defaultall = false); | 48 void reset(bool defaultall = false); |
49 void release(); | 49 void release(); |
50 | 50 |
51 void play(); | 51 void play(); |
52 void pause(); | 52 void pause(); |
53 void stop(); | 53 void stop(); |
54 | 54 |
55 void setLooping(bool loop); | 55 void setLooping(bool loop); |
56 void setRoleoff(float roleoff); | |
56 void setPositioning(bool relative); | 57 void setPositioning(bool relative); |
57 void setPosition(float x, float y, float z); | 58 void setPosition(float x, float y, float z); |
58 void setVelocity(float x, float y, float z); | 59 void setVelocity(float x, float y, float z); |
59 void setGain(float gain); | 60 void setGain(float gain); |
60 float getGain(); | 61 float getGain(); |
61 | 62 |
62 bool isStereo(); | 63 bool isStereo(); |
63 short getBitResolution(); | 64 short getBitResolution(); |
64 unsigned long getSampleRate(); | 65 unsigned long getSampleRate(); |
65 | 66 |
66 void setCursor(SoundPositionType type, float value); | 67 void setCursor(SoundPositionType type, float value); |
67 float getCursor(SoundPositionType type); | 68 float getCursor(SoundPositionType type); |
68 }; | 69 }; |
69 } | 70 } |
70 | 71 |