|
Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
|
Component to emit 2D or spatialized 3D sounds. More...
#include <AudioSource.hpp>
Public Attributes | |
| std::string | clipPath = "" |
| Path to the audio sound clip file (e.g. .wav, .mp3, .flac). | |
| float | volume = 1.0f |
| Playback volume multiplier (0.0 to 1.0+). | |
| float | pitch = 1.0f |
| Playback pitch/frequency multiplier. | |
| bool | loop = false |
| Whether sound loops continuously when playback completes. | |
| bool | playOnAwake = true |
| Automatically start audio playback when scene initializes. | |
| bool | spatialized = true |
| Enable 3D spatial attenuation and directional panning. | |
| float | minDistance = 1.0f |
| Distance at which volume starts attenuating. | |
| float | maxDistance = 50.0f |
| Maximum distance beyond which sound is silent. | |
| bool | isPlaying = false |
| Active playback state flag. | |
| bool | wasPlaying = false |
| Previous frame playback state flag. | |
| void * | internalSound = nullptr |
| Opaque handle pointer to miniaudio sound object (ma_sound*). | |
| std::string | currentLoadedPath = "" |
| Currently loaded audio file path. | |
Component to emit 2D or spatialized 3D sounds.
| std::string AudioSourceComponent::clipPath = "" |
Path to the audio sound clip file (e.g. .wav, .mp3, .flac).
| std::string AudioSourceComponent::currentLoadedPath = "" |
Currently loaded audio file path.
| void* AudioSourceComponent::internalSound = nullptr |
Opaque handle pointer to miniaudio sound object (ma_sound*).
| bool AudioSourceComponent::isPlaying = false |
Active playback state flag.
| bool AudioSourceComponent::loop = false |
Whether sound loops continuously when playback completes.
| float AudioSourceComponent::maxDistance = 50.0f |
Maximum distance beyond which sound is silent.
| float AudioSourceComponent::minDistance = 1.0f |
Distance at which volume starts attenuating.
| float AudioSourceComponent::pitch = 1.0f |
Playback pitch/frequency multiplier.
| bool AudioSourceComponent::playOnAwake = true |
Automatically start audio playback when scene initializes.
| bool AudioSourceComponent::spatialized = true |
Enable 3D spatial attenuation and directional panning.
| float AudioSourceComponent::volume = 1.0f |
Playback volume multiplier (0.0 to 1.0+).
| bool AudioSourceComponent::wasPlaying = false |
Previous frame playback state flag.