AudioSource class to play sound effects.
More...
#include <audioSource.h>
AudioSource class to play sound effects.
◆ AudioSource() [1/3]
| AudioSource::AudioSource |
( |
const std::string & | soundFile | ) |
|
Constructs an AudioSource object with the specified sound file.
- Parameters
-
| soundFile | The path to the sound file. |
◆ AudioSource() [2/3]
Constructs an AudioSource object with the specified sound file and position.
- Parameters
-
| soundFile | The path to the sound file. |
| x | The x-coordinate of the position. |
| y | The y-coordinate of the position. |
| z | The z-coordinate of the position. |
◆ AudioSource() [3/3]
| Aire::AudioSource::AudioSource |
( |
const std::string & | soundFile, |
|
|
const glm::vec3 & | pos ) |
Constructs an AudioSource object with the specified sound file and position.
- Parameters
-
| soundFile | The path to the sound file. |
| pos | The position vector. |
◆ getPosition()
| glm::vec3 Aire::AudioSource::getPosition |
( |
| ) |
const |
Gets the position of the AudioSource.
- Returns
- The position vector.
◆ loop()
Sets whether the audio should loop.
- Parameters
-
| shouldLoop | True if the audio should loop, false otherwise. |
- Returns
- Pointer to the current AudioSource object.
◆ setExponentialDistanceModel()
Set the distance model to exponential.
- Parameters
-
- Returns
- Pointer to the current AudioSource object.
◆ setLinearDistanceModel()
| AudioSource * Aire::AudioSource::setLinearDistanceModel |
( |
| ) |
|
Set the distance model to linear.
- Returns
- Pointer to the current AudioSource object.
◆ setPosition() [1/2]
◆ setPosition() [2/2]
Sets the position of the AudioSource.
- Parameters
-
| x | The x-coordinate of the position. |
| y | The y-coordinate of the position. |
| z | The z-coordinate of the position. |
- Returns
- Pointer to the current AudioSource object.
◆ setValue()
◆ spatial()
Sets whether the audio should be spatial.
- Parameters
-
| isSpatial | True if the audio should be spatial, false otherwise. |
- Returns
- Pointer to the current AudioSource object.
The documentation for this class was generated from the following files: