Plays back Sounds.
More...
#include <components/audio.h>
◆ AudioComponent()
tram::AudioComponent::AudioComponent |
( |
| ) |
|
|
inline |
◆ ~AudioComponent()
tram::AudioComponent::~AudioComponent |
( |
| ) |
|
◆ EventHandler()
void tram::AudioComponent::EventHandler |
( |
Event & |
event | ) |
|
|
inlinevirtual |
◆ IsDebugInfoDraw()
bool tram::AudioComponent::IsDebugInfoDraw |
( |
| ) |
|
|
static |
◆ IsPlaying()
bool tram::AudioComponent::IsPlaying |
( |
| ) |
|
Checks if component is playing a sound.
- Returns
- True, if a sound is playing, false if it hasn't started or has stopped.
◆ IsSourceDraw()
bool tram::AudioComponent::IsSourceDraw |
( |
| ) |
|
|
static |
Checks whether the audio source is drawn.
Check SetSourceDraw() for more info.
◆ Pause()
void tram::AudioComponent::Pause |
( |
| ) |
|
Pauses the sound.
Pauses the sound that the component is playing, or does nothing, if no sound is playing.
◆ Play()
void tram::AudioComponent::Play |
( |
| ) |
|
Plays the sound.
Plays the sound that the component has been set to play.
◆ SetDebugInfoDraw()
void tram::AudioComponent::SetDebugInfoDraw |
( |
bool |
draw | ) |
|
|
static |
Sets the drawing of debug info.
If set to true, each frame some debug text will be drawn for each audio source. This is useful for debugging.
◆ SetLocation()
void tram::AudioComponent::SetLocation |
( |
vec3 |
location | ) |
|
Sets the location from which the sound will play.
◆ SetRepeating()
void tram::AudioComponent::SetRepeating |
( |
bool |
is_repeating | ) |
|
Sets whether the component will repeat its sound.
◆ SetSound()
void tram::AudioComponent::SetSound |
( |
name_t |
name | ) |
|
Sets the sound that the component will play.
◆ SetSourceDraw()
void tram::AudioComponent::SetSourceDraw |
( |
bool |
draw | ) |
|
|
static |
Sets the drawing of audio sources.
If set to true, each audio component will initialize a 3D model, which will allow you to see the posiiton of the audio sources. Useful for debugging.
◆ SetupModel()
void tram::AudioComponent::SetupModel |
( |
| ) |
|
|
protected |
◆ Start()
void tram::AudioComponent::Start |
( |
| ) |
|
|
virtual |
◆ Stop()
void tram::AudioComponent::Stop |
( |
| ) |
|
Stops the sound.
Stops the sound that the component is playing, or does nothing, if no sound is playing.
◆ location
vec3 tram::AudioComponent::location = {0.0f, 0.0f, 0.0f} |
|
protected |
◆ model
◆ play_on_start
bool tram::AudioComponent::play_on_start = false |
|
protected |
◆ repeat
bool tram::AudioComponent::repeat = false |
|
protected |
◆ sound
◆ source
The documentation for this class was generated from the following files:
- C:/Users/Poga/Desktop/painis/tram-sdk/src/components/audio.h
- C:/Users/Poga/Desktop/painis/tram-sdk/src/components/audio.cpp