Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Assets::AudioFlowStore Class Reference

Registry for audio flows keyed by (glTF path, flow name). More...

#include <AudioFlowStore.h>

Collaboration diagram for Engine::Assets::AudioFlowStore:

Classes

struct  Record
 One stored flow. More...

Public Member Functions

 AudioFlowStore ()=default
 AudioFlowStore (const AudioFlowStore &)=delete
AudioFlowStore & operator= (const AudioFlowStore &)=delete
AudioFlowHandle registerFlow (std::filesystem::path gltfPath, std::string flowName, std::string flowJson, std::string baseDir)
 Register a flow document under its identity.
AudioFlowHandle find (const std::filesystem::path &gltfPath, const std::string &flowName) const
 Get the registered handle for a flow identity.
bool flow (const AudioFlowHandle &handle, std::string *outJson, std::string *outBaseDir) const
 Look up a flow's JSON + base directory.
FlowSettingHandle findSetting (const AudioFlowHandle &handle, const std::string &settingName) const
 Resolve a named setting of a flow to a stable handle.
size_t size () const
 Number of registered flows.
void clear ()
 Drop all registered flows.

Static Private Member Functions

static std::string keyFor (const AudioFlowHandle &handle)

Private Attributes

std::vector< Record > records_
std::unordered_map< std::string, uint32_t > keyToIndex_

Detailed Description

Registry for audio flows keyed by (glTF path, flow name).

Holds the flow's JSON document (bank form) and the base directory its bank wavs are resolved against, so playback can build the shared AudioFlowGraph runtime on demand. Deduplicates identical identities and resolves named settings to stable FlowSettingHandle values.

Definition at line 22 of file AudioFlowStore.h.

Constructor & Destructor Documentation

◆ AudioFlowStore() [1/2]

Engine::Assets::AudioFlowStore::AudioFlowStore ( )
default

Referenced by AudioFlowStore(), and operator=().

Here is the caller graph for this function:

◆ AudioFlowStore() [2/2]

Engine::Assets::AudioFlowStore::AudioFlowStore ( const AudioFlowStore & )
delete

References AudioFlowStore().

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void Engine::Assets::AudioFlowStore::clear ( )

Drop all registered flows.

◆ find()

AudioFlowHandle Engine::Assets::AudioFlowStore::find ( const std::filesystem::path & gltfPath,
const std::string & flowName ) const
nodiscard

Get the registered handle for a flow identity.

Returns
The stored handle, or a null handle when not registered.

◆ findSetting()

FlowSettingHandle Engine::Assets::AudioFlowStore::findSetting ( const AudioFlowHandle & handle,
const std::string & settingName ) const
nodiscard

Resolve a named setting of a flow to a stable handle.

Returns
A valid handle, or a null handle when the flow or name is unknown.

◆ flow()

bool Engine::Assets::AudioFlowStore::flow ( const AudioFlowHandle & handle,
std::string * outJson,
std::string * outBaseDir ) const
nodiscard

Look up a flow's JSON + base directory.

Returns
True when the handle is registered and the outputs were filled.

◆ keyFor()

std::string Engine::Assets::AudioFlowStore::keyFor ( const AudioFlowHandle & handle)
staticprivate

◆ operator=()

AudioFlowStore & Engine::Assets::AudioFlowStore::operator= ( const AudioFlowStore & )
delete

References AudioFlowStore().

Here is the call graph for this function:

◆ registerFlow()

AudioFlowHandle Engine::Assets::AudioFlowStore::registerFlow ( std::filesystem::path gltfPath,
std::string flowName,
std::string flowJson,
std::string baseDir )

Register a flow document under its identity.

Parameters
gltfPathPath of the glTF asset the flow belongs to.
flowNameFlow identity within the asset.
flowJsonThe flow JSON document (bank form).
baseDirDirectory bank wavs / clip files resolve against.
Returns
The stable handle for the flow; null when the name is empty.

◆ size()

size_t Engine::Assets::AudioFlowStore::size ( ) const
inlinenodiscard

Number of registered flows.

Definition at line 61 of file AudioFlowStore.h.

References records_.

Member Data Documentation

◆ keyToIndex_

std::unordered_map<std::string, uint32_t> Engine::Assets::AudioFlowStore::keyToIndex_
private

Definition at line 81 of file AudioFlowStore.h.

◆ records_

std::vector<Record> Engine::Assets::AudioFlowStore::records_
private

Definition at line 80 of file AudioFlowStore.h.

Referenced by size().


The documentation for this class was generated from the following file:
  • /workspace/magerbeton/gl3-vulkan/code/Engine/include/Engine/Audio/AudioFlowStore.h