22 #ifndef FIFE_SOUNDEMITTER_H_ 23 #define FIFE_SOUNDEMITTER_H_ 78 void setSource(ALuint source);
82 ALuint getSource()
const;
86 bool isActive()
const;
102 void setRelativePositioning(
bool relative);
106 bool isRelativePositioning()
const;
111 void setReferenceDistance(
float distance);
115 float getReferenceDistance()
const;
120 void setMaxDistance(
float distance);
124 float getMaxDistance()
const;
130 void setRolloff(
float rolloff);
134 float getRolloff()
const;
149 void setSoundClip(
const std::string& name);
155 void reset(
bool defaultall =
false);
163 void setLooping(
bool loop);
167 bool isLooping()
const;
175 void play(
float inTime,
float outTime);
183 void stop(
float time);
197 void setGain(
float gain);
203 float getGain()
const;
209 void setMaxGain(
float gain);
215 float getMaxGain()
const;
221 void setMinGain(
float gain);
227 float getMinGain()
const;
237 int16_t getBitResolution();
241 uint64_t getSampleRate();
245 uint64_t getDecodedLength();
249 uint64_t getDuration();
277 bool isPosition()
const;
289 void setPitch(
float pitch);
293 float getPitch()
const;
305 void setConeInnerAngle(
float inner);
309 float getConeInnerAngle()
const;
313 void setConeOuterAngle(
float outer);
317 float getConeOuterAngle()
const;
321 void setConeOuterGain(
float gain);
325 float getConeOuterGain()
const;
333 void setGroup(
const std::string& group);
337 const std::string& getGroup();
365 void activateEffects();
369 void deactivateEffects();
373 void setCheckDifference();
388 void attachSoundClip();
392 void detachSoundClip();
404 void resetInternData();
408 void callOnSoundFinished();
uint32_t m_emitterId
The emitter-id.
virtual ~SoundEmitterListener()
uint32_t m_fadeOutStartTimestamp
fade out start time
float m_origGain
original gain
std::vector< SoundEffect * > m_effects
holds pointer to applied SoundEffects
SoundStateType
State of the audio file.
SoundClipPtr m_soundClip
The attached sound clip.
std::vector< SoundEmitterListener * > m_listeners
listeners for sound related events
bool m_fadeOut
fade out clip
uint32_t m_fadeInStartTimestamp
fade in start time
uint32_t m_fadeInEndTimestamp
fade in end time
Base class for Efx sound effects.
The class defines filters.
Listener interface for SoundEmitter.
uint32_t m_streamId
The id of the stream.
AudioSpaceCoordinate direction
std::string m_group
the group name
ALuint m_source
The openAL-source.
SoundPositionType
Different types of audio-file positions.
SoundFilter * m_directFilter
Applied direct sound filter.
void removeListener(std::deque< T > &vec, T &listener)
uint32_t m_fadeOutEndTimestamp
fade out end time
float m_samplesOffset
saves sample offset for played stream parts
void addListener(std::deque< T > &vec, T &listener)
std::iterator_traits< octet_iterator >::difference_type distance(octet_iterator first, octet_iterator last)
SoundStateType soundState
bool m_fadeIn
fade in clip
The class for playing audio files.
virtual void onSoundFinished(uint32_t emitterId, uint32_t soundClipId)=0
Called when a sound finished playing.
AudioSpaceCoordinate position
uint32_t m_playCheckDifference
time difference between play and first check
uint32_t m_soundClipId
Id of the attached sound clip.
SoundManager * m_manager
Access to the SoundManager.
AudioSpaceCoordinate velocity