asge::game::components::AudioSource
An entity's audio clip plus its current playback state.
#include <AudioSource.hpp>m_VirtualClipPath (set directly or via scene deserialization) is resolved to m_Clip by asset::AssetManager::ResolveAssets, same as Sprite/Animation resolve their own paths. m_Stream is left null until systems::AudioSystem first plays this source once assigned, it points into the owning audio::AudioDevice's stream pool and stays valid for this source's lifetime (see AudioDevice's doc comment); replaying it (see PlayAudioSource) always reuses that same stream rather than creating a new one, until DetachAudioSource releases it back to the pool. Use PlayAudioSource/StopAudioSource/DetachAudioSource rather than touching m_Playing/m_Stream directly, so m_Loop and m_Restart stay in sync with the request.
m_ResolvedVirtualClipPath (also runtime-only) is what m_Clip was actually last resolved from — Resolver<AudioSource> compares it against m_VirtualClipPath to notice a change (repointing to a new clip) or a clear (path emptied out, m_Clip released back to null), rather than resolving once and never again.
Public Types
using audio_clip_asset = std::shared_ptr< asset::Asset< media::AudioClip > >using stream = std::shared_ptr< audio::AudioStream >Public Attributes
audio_clip_asset m_Clip { nullptr }str::String m_VirtualClipPath {}str::String m_ResolvedVirtualClipPath {}