|
Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
|
Component for entities that emit continuous sound (music, loops, ambient) More...
#include <AudioSource.hpp>
Public Attributes | |
| std::string | audioPath |
| Path to the audio file. | |
| float | volume {1.0f} |
| Volume level (0.0 - 1.0) | |
| bool | loop {false} |
| Whether the audio should loop. | |
| bool | isPlaying {false} |
| Current playback state. | |
| float | pitch {1.0f} |
| Pitch multiplier. | |
| bool | dirty {true} |
| Flag to indicate changes need to be applied. | |
| uint32_t | sourceId {0} |
| Internal audio source identifier. | |
Component for entities that emit continuous sound (music, loops, ambient)
This component manages persistent audio sources that can be played, paused, stopped, and have their volume adjusted in real-time.
Definition at line 21 of file AudioSource.hpp.
| std::string rtp::ecs::components::audio::AudioSource::audioPath |
Path to the audio file.
Definition at line 22 of file AudioSource.hpp.
Referenced by rtp::client::scenes::MenuScene::onEnter(), rtp::client::scenes::PlayingScene::onEnter(), and rtp::client::AudioSystem::playAudioSource().
| bool rtp::ecs::components::audio::AudioSource::dirty {true} |
Flag to indicate changes need to be applied.
Definition at line 27 of file AudioSource.hpp.
Referenced by rtp::client::scenes::MenuScene::onEnter(), and rtp::client::scenes::PlayingScene::onEnter().
| bool rtp::ecs::components::audio::AudioSource::isPlaying {false} |
Current playback state.
Definition at line 25 of file AudioSource.hpp.
Referenced by rtp::client::scenes::MenuScene::onEnter(), and rtp::client::scenes::PlayingScene::onEnter().
| bool rtp::ecs::components::audio::AudioSource::loop {false} |
Whether the audio should loop.
Definition at line 24 of file AudioSource.hpp.
Referenced by rtp::client::scenes::MenuScene::onEnter(), rtp::client::scenes::PlayingScene::onEnter(), and rtp::client::AudioSystem::playAudioSource().
| float rtp::ecs::components::audio::AudioSource::pitch {1.0f} |
Pitch multiplier.
Definition at line 26 of file AudioSource.hpp.
Referenced by rtp::client::AudioSystem::playAudioSource().
| uint32_t rtp::ecs::components::audio::AudioSource::sourceId {0} |
Internal audio source identifier.
Definition at line 28 of file AudioSource.hpp.
Referenced by rtp::client::AudioSystem::playAudioSource().
| float rtp::ecs::components::audio::AudioSource::volume {1.0f} |
Volume level (0.0 - 1.0)
Definition at line 23 of file AudioSource.hpp.
Referenced by rtp::client::scenes::MenuScene::onEnter(), rtp::client::scenes::PlayingScene::onEnter(), and rtp::client::AudioSystem::playAudioSource().