Class AudioSource¶
Defined in File audio_source.h
Inheritance Relationships¶
Derived Types¶
public StaticAudioSource(Class StaticAudioSource)public StreamingAudioSource(Class StreamingAudioSource)
Class Documentation¶
-
class
AudioSource¶ An interface for an audio source in the game world.
Subclassed by StaticAudioSource, StreamingAudioSource
Public Types
-
enum
AttenuationModel¶ Defines all attenuation models provided by OpenAL.
Values:
-
Linear= AL_LINEAR_DISTANCE¶
-
Inverse= AL_INVERSE_DISTANCE¶
-
Exponential= AL_EXPONENT_DISTANCE¶
-
LinearClamped= AL_LINEAR_DISTANCE_CLAMPED¶
-
InverseClamped= AL_INVERSE_DISTANCE_CLAMPED¶
-
ExponentialClamped= AL_EXPONENT_DISTANCE_CLAMPED¶
-
Public Functions
-
virtual void
setLooping(bool enabled)¶
-
virtual void
queueNewBuffers()¶ Queue new buffers to the audio card if possible.
-
void
play()¶
-
void
pause()¶
-
void
stop()¶
-
bool
isPlaying() const¶
-
bool
isPaused() const¶
-
bool
isStopped() const¶
-
virtual bool
isLooping() const¶
-
virtual float
getDuration() const = 0¶ Get audio duration in seconds.
-
void
setVolume(float volume)¶
-
void
setModel(AttenuationModel distanceModel)¶
-
enum