Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
AudioSource.hpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2025
3** Air-Trap
4** File description:
5** AudioSource - Component for persistent audio playback
6*/
7
8#pragma once
9
10#include <string>
11#include <cstdint>
12
14
22 std::string audioPath;
23 float volume{1.0f};
24 bool loop{false};
25 bool isPlaying{false};
26 float pitch{1.0f};
27 bool dirty{true};
28 uint32_t sourceId{0};
29};
30
31} // namespace rtp::ecs::components::audio
Component for entities that emit continuous sound (music, loops, ambient)
std::string audioPath
Path to the audio file.
bool isPlaying
Current playback state.
bool dirty
Flag to indicate changes need to be applied.
uint32_t sourceId
Internal audio source identifier.
float volume
Volume level (0.0 - 1.0)
bool loop
Whether the audio should loop.