#include <AudioSource.h>
List of all members.
Detailed Description
Defines an audio source in 3D space.
This can be attached to a Node for applying its 3D transformation.
- See also:
- http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Audio
Member Enumeration Documentation
The audio source's audio state.
Member Function Documentation
Create an audio source. This is used to instantiate an Audio Source. Currently only wav, au, and raw files are supported. Alternately, a URL specifying a Properties object that defines an audio source can be used (where the URL is of the format "<file-path>.<extension>#<namespace-id>/<namespace-id>/.../<namespace-id>" and "#<namespace-id>/<namespace-id>/.../<namespace-id>" is optional).
- Parameters:
-
url | The relative location on disk of the sound file or a URL specifying a Properties object defining an audio source. |
streamed | Don't read the entire audio buffer first before playing, instead play immediately from a stream that is read on demand. |
- Returns:
- The newly created audio source, or NULL if an audio source cannot be created.
Create an audio source from the given properties object.
- Parameters:
-
properties | The properties object defining the audio source (must have namespace equal to 'audio'). |
- Returns:
- The newly created audio source, or
NULL
if the audio source failed to load.
Returns the gain of the audio source.
- Returns:
- The gain.
Gets the node that this source is attached to.
- Returns:
- The node that this audio source is attached to.
Returns the pitch of the audio source.
- Returns:
- The pitch.
Gets the current state of the audio source.
- Returns:
- PLAYING if the source is playing, STOPPED if the source is stopped, PAUSED if the source is paused and INITIAL otherwise.
Gets the velocity of the audio source.
- Returns:
- The velocity as a vector.
Determines whether the audio source is looped or not.
- Returns:
- true if the audio source is looped, false if not.
Determines whether the audio source is streaming or not.
- Returns:
- true if the audio source is streaming, false if not.
Pauses the playing of the audio source.
Resumes playing of the audio source.
Rewinds the audio source to the beginning.
Sets the gain/volume of the audio source.
- Parameters:
-
gain | The gain/volume of the source. |
Sets the state of the audio source to be looping or not.
- Parameters:
-
looped | true to loop the sound, false to not loop it. |
Sets the pitch of the audio source.
- Parameters:
-
pitch | The pitch of the source. |
Sets the velocity of the audio source.
- Parameters:
-
velocity | A vector representing the velocity. |
Sets the velocity of the audio source.
- Parameters:
-
x | The x coordinate of the velocity. |
y | The y coordinate of the velocity. |
z | The z coordinate of the velocity. |
Stops the playing of the audio source.