uint32_t getId() const
Returns the emitter-id.
void setPosition(const AudioSpaceCoordinate &position)
Sets the position of the SoundEmitter in the virtual audio space.
void setGain(float gain)
Sets the gain of the emitter.
void setConeOuterAngle(float outer)
Sets outer angle of the sound cone, in degrees.
void setPitch(float pitch)
Sets pitch multiplier.
void setConeOuterGain(float gain)
Sets the gain when outside the oriented cone.
void setActionAudio(ActionAudio *audio)
Sets the ActionAudio.
float getGain() const
Returns the gain of the emitter.
Interface class between Instance / ActionAudio and SoundEmitter.
void reset(bool defaultall=false)
Reset the emitter, free all internal buffers.
void setRelativePositioning(bool relative)
Sets Positioning-Type Default is false.
float getConeInnerAngle() const
Return inner angle of the sound cone, in degrees.
SoundEmitter * createEmitter()
Returns a pointer to an allocated emitter-instance.
const AudioSpaceCoordinate & getVelocity() const
Return the velocity of the SoundEmitter in the virtual audio space.
static Logger _log(LM_AUDIO)
SoundSource(Instance *instance)
float getPitch() const
Return pitch multiplier.
float getMaxDistance() const
Return the max distance.
static SoundManager * instance()
Location & getLocationRef()
Gets reference of current location of instance.
bool isDirection() const
Return true if the Instance direction is used, false for undirected.
void setMaxDistance(float distance)
Sets the max distance used with the Inverse Clamped Distance Model to set the distance where there wi...
void addChangeListener(InstanceChangeListener *listener)
Adds new instance change listener.
SoundChangeListener(SoundSource *source)
bool isLooping() const
Return playing mode.
void play()
Plays the associated audio file.
uint32_t InstanceChangeInfo
void setGroup(const std::string &group)
Sets the group name.
The class for holding audio data per Action.
Location getFacingLocation()
Returns the direction where instance is heading.
bool isLooping() const
Return playing mode.
void setPosition()
Sets the positon of the SoundEmitter, called from Instance.
void removeChangeListener(InstanceChangeListener *listener)
Removes associated instance change listener.
void setMaxGain(float gain)
Sets the max.
void setLooping(bool loop)
Sets the playing mode.
ActionAudio * getActionAudio() const
Return ActionAudio.
float getRolloff() const
Return the AL_ROLEOFF_FACTOR.
virtual ~SoundChangeListener()
float getMinGain() const
Returns the min.
virtual void onInstanceChanged(Instance *instance, InstanceChangeInfo info)
void setReferenceDistance(float distance)
Sets the distance under which the volume for the SoundEmitter would normally drop by half (before bei...
void updateSoundEmitter()
Moves data from ActionAudio to SoundEmitter.
void setDirection(const AudioSpaceCoordinate &direction)
Sets the direction of the SoundEmitter in the virtual audio space.
float getMaxGain() const
Returns the max.
void rewind()
Rewinds the associated audio file.
bool isRelativePositioning() const
Return Positioning-Type.
void setMinGain(float gain)
Sets the min.
const std::string & getGroupName() const
Return the name of the group to which the emitter is added.
void setDirection()
Sets the direction of the SoundEmitter, called from Instance.
void releaseEmitter(uint32_t emitterId)
Release an emitter-instance given by emitter-id.
ExactModelCoordinate getMapCoordinates() const
Gets map coordinates set to this location.
float getConeOuterAngle() const
Return outer angle of the sound cone, in degrees.
Instance * m_instance
Associated Instance.
ActionAudio * m_audio
Actual ActionAudio.
void setConeInnerAngle(float inner)
Sets inner angle of the sound cone, in degrees.
void stop()
Stops playing the audio file and rewinds to the beginning.
SoundChangeListener * m_listener
InstanceChangeListener for position and direction.
float getConeOuterGain() const
Return the gain when outside the oriented cone.
void setRolloff(float rolloff)
Sets the AL_ROLEOFF_FACTOR.
void setVelocity(const AudioSpaceCoordinate &velocity)
Sets the velocity of the SoundEmitter in the virtual audio space.
float getReferenceDistance() const
Return the reference distance.
void setSoundClip(SoundClipPtr soundClip)
Sets the sound clip to be used by this emitter.
An Instance is an "instantiation" of an Object at a Location.
const std::string & getSoundFileName() const
Return the name of the sound file.
SoundEmitter * m_emitter
Related SoundEmitter.