6#include "Engine/Audio/AudioConfig.h"
7#include "Engine/Audio/AudioAssetRef.h"
8#include "Engine/Audio/AudioLoader.h"
49 NamedThreadPool* assetLoaderPool);
61 void tick(
bool async =
true);
87 std::filesystem::path
path;
90 std::future<Assets::AudioData>
future;
Manages audio assets by filesystem path, providing dedup and lookup.
Coordinates engine asset loading pipelines and runtime texture descriptor ownership.
Owns the miniaudio engine and provides the playback API.
void setAudioEngine(Core::AudioEngine *engine)
Set the AudioEngine to notify when assets finish loading.
std::vector< AudioLoadFuture > loadFutures_
void retrieveDecodedAudio()
Core::AudioEngine * audioEngine_
void tick(bool async=true)
Advances the pipeline state machine (call once per frame)
size_t getPendingCount() const
Returns the number of audio assets still pending.
void submitAsset(const std::filesystem::path &asset)
Submit an audio file for async loading.
void discardPendingWork()
Clears all queued and in-flight audio loading work.
AudioAssetPipeline(Assets::AudioAssetManager *audioAssetManager, NamedThreadPool *assetLoaderPool)
Create an audio asset loading pipeline.
std::vector< std::filesystem::path > assetQueue_
friend class AssetManager
Assets::AudioAssetManager * audioAssetManager_
NamedThreadPool * assetLoaderPool_
Owns the engine runtime and provides access to engine subsystems.
Asset::Ref< Asset::Path, Audio > AudioAssetRef
Asset reference to decoded audio data loaded from a filesystem path.
constexpr size_t MAX_AUDIO_LOADS_PER_FRAME
Maximum audio assets to finalize per frame in the pipeline.
EnTT component data used by engine systems.
Assets::AudioAssetRef ref
std::filesystem::path path
std::future< Assets::AudioData > future