Navigation
API > API/Runtime > API/Runtime/Engine
This implementation of the audio streaming manager uses an internal LRU cache (or in more advanced applications, a bank of parallel LRU caches)
| Name | FCachedAudioStreamingManager |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/AudioStreamingCache.h |
| Include Path | #include "AudioStreamingCache.h" |
Syntax
struct FCachedAudioStreamingManager : public IAudioStreamingManager
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCachedAudioStreamingManager
(
const FCachedAudioStreamingManagerParams& InitParams |
Constructor, initializing all members | AudioStreamingCache.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FCachedAudioStreamingManager() |
AudioStreamingCache.h |
Functions
Public
Overridden from IAudioStreamingManager
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddForceInlineSoundWave
(
const FSoundWaveProxyPtr& SoundWave |
Adds the memory usage of the force inline sound to the streaming cache budget | AudioStreamingCache.h | |
virtual FString GenerateMemoryReport() |
Generate a memory report as a formatted string for this streaming manager. | AudioStreamingCache.h | |
virtual FAudioChunkHandle GetLoadedChunk
(
const FSoundWaveProxyPtr& SoundWave, |
Gets a pointer to a chunk of audio data | AudioStreamingCache.h | |
virtual void RemoveForceInlineSoundWave
(
const FSoundWaveProxyPtr& SoundWave |
Removes the memory usage of the force inline sound from the streaming cache budget | AudioStreamingCache.h | |
| Used for rendering debug info: | AudioStreamingCache.h | ||
virtual bool RequestChunk
(
const FSoundWaveProxyPtr& SoundWave, |
AudioStreamingCache.h | ||
virtual void SetProfilingMode
(
bool bEnabled |
Whether to toggle a performance intensive profiling mode the streaming manager. | AudioStreamingCache.h | |
virtual uint64 TrimMemory
(
uint64 NumBytesToFree |
This will start evicting elements from the cache until either hit our target of bytes or run out of chunks we can free. | AudioStreamingCache.h |
Overridden from IStreamingManager
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddLevel
(
ULevel* Level |
Adds a ULevel that has already prepared StreamingData to the streaming manager. | AudioStreamingCache.h | |
virtual int32 BlockTillAllRequestsFinished
(
float TimeLimit, |
Blocks till all pending requests are fulfilled. | AudioStreamingCache.h | |
virtual void CancelForcedResources() |
Cancels the timed Forced resources (i.e used the Kismet action "Stream In Textures"). | AudioStreamingCache.h | |
virtual void NotifyLevelChange() |
Notifies manager of "level" change. | AudioStreamingCache.h | |
virtual void NotifyLevelOffset
(
ULevel* Level, |
Notifies manager that level primitives were shifted | AudioStreamingCache.h | |
virtual void RemoveLevel
(
ULevel* Level |
Removes a ULevel from the streaming manager. | AudioStreamingCache.h | |
virtual void SetDisregardWorldResourcesForFrames
(
int32 NumFrames |
Don't stream world resources for the next NumFrames. | AudioStreamingCache.h | |
virtual void UpdateResourceStreaming
(
float DeltaTime, |
Updates streaming, taking into account all current view infos. | AudioStreamingCache.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAudioChunkCache * GetCacheForChunkSize
(
uint32 InChunkSize |
AudioStreamingCache.h | ||
FAudioChunkCache * GetCacheForWave
(
const FSoundWaveProxyPtr& InSoundWave |
Returns which cache this sound wave should be in, based on the size of this sound wave's chunk, or nullptr if MemoryLoadOnDemand is disabled. | AudioStreamingCache.h |
Overridden from IAudioStreamingManager
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddMemoryCountedFeature
(
const FAudioStreamCacheMemoryHandle& Feature |
These are used to update the memory count of Memory Counted Features. | AudioStreamingCache.h | |
virtual void AddReferenceToChunk
(
const FAudioChunkHandle& InHandle |
These are used to reference count consumers of audio chunks. | AudioStreamingCache.h | |
virtual void HandleStarvation
(
const FSoundWaveProxyPtr& SoundWave, |
In the event that the decoder playing back the chunks is in a starvation state due to an outstanding chunk load, handle that here. | AudioStreamingCache.h | |
virtual void RemoveMemoryCountedFeature
(
const FAudioStreamCacheMemoryHandle& Feature |
This can be used to decrease the memory count for external features. | AudioStreamingCache.h | |
virtual void RemoveReferenceToChunk
(
const FAudioChunkHandle& InHandle |
This can be used to decrement reference counted handles to audio chunks. | AudioStreamingCache.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static int32 GetNextChunkIndex
(
const FSoundWaveProxyPtr& InSoundWave, |
Returns the next chunk to kick off a load for, or INDEX_NONE if there is only one chunk to cache. | AudioStreamingCache.h |