class
#include <core/al/audio_device.hpp>
Source Abstract audio source.
Public functions
- void setBuffer(std::shared_ptr<Buffer> buffer) pure virtual
- Sets the buffer to be played by the source.
- void setPosition(const glm::vec3& position) pure virtual
- Sets the position of the source, by default, in the world space.
- void setVelocity(const glm::vec3& velocity) pure virtual
- Sets the velocity of the source, by default, in the world space.
- void setGain(float gain) pure virtual
- Sets the gain of the source.
- void setPitch(float pitch) pure virtual
- Sets the pitch of the source.
- void setLooping(bool looping) pure virtual
- Sets whether the source plays in a loop.
- void setRelative(bool relative) pure virtual
- Sets whether the source position and velocity is relative to the listener or not.
- void setDistance(float maxDistance) pure virtual
- Sets the maximum distance at which the source is audible.
- void setConeAngle(float coneAngle) pure virtual
- Sets the cone angle of the source, in degrees. By default, 360.
- void setConeGain(float coneGain) pure virtual
- Sets the cone gain of the source.
- void setConeDirection(const glm::vec3& direction) pure virtual
- Sets the cone direction of the source.
- void setReferenceDistance(float referenceDistance) pure virtual
- Sets the distance under which the volume for the source would normally drop by half.
- void play() pure virtual
- Plays the source.
Function documentation
void cubos:: core:: al:: impl:: Source:: setPosition(const glm::vec3& position) pure virtual
Sets the position of the source, by default, in the world space.
Parameters | |
---|---|
position | Position. |
void cubos:: core:: al:: impl:: Source:: setVelocity(const glm::vec3& velocity) pure virtual
Sets the velocity of the source, by default, in the world space.
Parameters | |
---|---|
velocity | Velocity. |
void cubos:: core:: al:: impl:: Source:: setGain(float gain) pure virtual
Sets the gain of the source.
Parameters | |
---|---|
gain | Gain. |
void cubos:: core:: al:: impl:: Source:: setPitch(float pitch) pure virtual
Sets the pitch of the source.
Parameters | |
---|---|
pitch | Pitch. |
void cubos:: core:: al:: impl:: Source:: setLooping(bool looping) pure virtual
Sets whether the source plays in a loop.
Parameters | |
---|---|
looping | Looping flag. |
void cubos:: core:: al:: impl:: Source:: setRelative(bool relative) pure virtual
Sets whether the source position and velocity is relative to the listener or not.
Parameters | |
---|---|
relative | Relative flag. |
void cubos:: core:: al:: impl:: Source:: setDistance(float maxDistance) pure virtual
Sets the maximum distance at which the source is audible.
Parameters | |
---|---|
maxDistance | Maximum distance. |
void cubos:: core:: al:: impl:: Source:: setConeAngle(float coneAngle) pure virtual
Sets the cone angle of the source, in degrees. By default, 360.
Parameters | |
---|---|
coneAngle | Angle, in degrees. |
void cubos:: core:: al:: impl:: Source:: setConeGain(float coneGain) pure virtual
Sets the cone gain of the source.
Parameters | |
---|---|
coneGain | Gain. |
void cubos:: core:: al:: impl:: Source:: setConeDirection(const glm::vec3& direction) pure virtual
Sets the cone direction of the source.
Parameters | |
---|---|
direction | Direction. |
void cubos:: core:: al:: impl:: Source:: setReferenceDistance(float referenceDistance) pure virtual
Sets the distance under which the volume for the source would normally drop by half.
Parameters | |
---|---|
referenceDistance | Distance. |