Holds decoded PCM audio data as an engine asset.
More...
#include <AudioAsset.h>
|
| | Audio (bool initEcsData=false) |
| | Creates an audio asset and optionally initializes ECS-backed asset data.
|
| | ~Audio () override=default |
| | Destroys the audio asset.
|
| void | setAudioData (AudioData &&audioData) |
| | Sets the decoded audio data.
|
| uint32_t | getSampleRate () const |
| | Getter.
|
| uint32_t | getChannels () const |
| | Getter.
|
| uint64_t | getFrameCount () const |
| | Getter.
|
| float | getDurationSeconds () const |
| | Getter.
|
| const std::vector< float > & | getPcmData () const |
| | Getter.
|
| void | unload () override |
| | Unloads the audio data and releases resources.
|
| void | updateLoadingState () override |
| | Updates the loading state based on data availability.
|
| | AssetBase (bool initializeDefaultEntity=false) |
| | Creates a base asset and optionally allocates its default ECS entity.
|
| virtual | ~AssetBase () |
| | Releases base asset resources.
|
| CpuLoadingState | getLoadingState () |
| | Gets the loading state of this asset.
|
| void | requestLoad () |
| | If this asset is in the UNLOADED state it will get added to the assets to load.
|
| entt::entity | getEntity () const |
| | Getter for data.
|
Holds decoded PCM audio data as an engine asset.
Definition at line 14 of file AudioAsset.h.
◆ Audio()
| Engine::Assets::Audio::Audio |
( |
bool | initEcsData = false | ) |
|
|
explicit |
Creates an audio asset and optionally initializes ECS-backed asset data.
- Parameters
-
| initEcsData | When true, initializes the base asset's ECS data entity. |
◆ ~Audio()
| Engine::Assets::Audio::~Audio |
( |
| ) |
|
|
overridedefault |
Destroys the audio asset.
◆ getChannels()
| uint32_t Engine::Assets::Audio::getChannels |
( |
| ) |
const |
|
inlinenodiscard |
◆ getDurationSeconds()
| float Engine::Assets::Audio::getDurationSeconds |
( |
| ) |
const |
|
inlinenodiscard |
◆ getFrameCount()
| uint64_t Engine::Assets::Audio::getFrameCount |
( |
| ) |
const |
|
inlinenodiscard |
◆ getPcmData()
| const std::vector< float > & Engine::Assets::Audio::getPcmData |
( |
| ) |
const |
|
inlinenodiscard |
◆ getSampleRate()
| uint32_t Engine::Assets::Audio::getSampleRate |
( |
| ) |
const |
|
inlinenodiscard |
◆ setAudioData()
| void Engine::Assets::Audio::setAudioData |
( |
AudioData && | audioData | ) |
|
Sets the decoded audio data.
- Parameters
-
| audioData | Decoded PCM data from AudioLoader (moved in) |
◆ unload()
| void Engine::Assets::Audio::unload |
( |
| ) |
|
|
overridevirtual |
Unloads the audio data and releases resources.
Reimplemented from Asset::AssetBase.
◆ updateLoadingState()
| void Engine::Assets::Audio::updateLoadingState |
( |
| ) |
|
|
overridevirtual |
Updates the loading state based on data availability.
Reimplemented from Asset::AssetBase.
◆ channels_
| uint32_t Engine::Assets::Audio::channels_ = 0 |
|
private |
◆ durationSeconds_
| float Engine::Assets::Audio::durationSeconds_ = 0.0f |
|
private |
◆ frameCount_
| uint64_t Engine::Assets::Audio::frameCount_ = 0 |
|
private |
◆ pcmData_
| std::vector<float> Engine::Assets::Audio::pcmData_ |
|
private |
◆ sampleRate_
| uint32_t Engine::Assets::Audio::sampleRate_ = 0 |
|
private |
The documentation for this class was generated from the following file:
- /workspace/magerbeton/gl3-vulkan/code/Engine/include/Engine/Audio/AudioAsset.h