UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FSoundBuffer Class Reference

#include <Audio.h>

+ Inheritance diagram for FSoundBuffer:

Public Member Functions

 FSoundBuffer (class FAudioDevice *InAudioDevice)
 
virtual ENGINE_API ~FSoundBuffer ()
 
virtual ENGINE_API FString Describe (bool bUseLongName)
 
FName GetSoundClassName ()
 
FString GetChannelsDesc ()
 
virtual bool ReadCompressedInfo (USoundWave *SoundWave)
 
virtual bool ReadCompressedData (uint8 *Destination, int32 NumFramesToDecode, bool bLooping)
 
virtual void Seek (const float SeekTime)
 
virtual int32 GetCurrentChunkIndex () const
 
virtual int32 GetCurrentChunkOffset () const
 
virtual bool IsRealTimeSourceReady ()
 
virtual void EnsureRealtimeTaskCompletion ()
 

Public Attributes

virtual int32 GetSize () PURE_VIRTUAL(FSoundBuffer
 
int32 ResourceID
 
int32 NumChannels
 
FString ResourceName
 
bool bAllocationInPermanentPool
 
class FAudioDeviceAudioDevice
 

Constructor & Destructor Documentation

◆ FSoundBuffer()

FSoundBuffer::FSoundBuffer ( class FAudioDevice InAudioDevice)
inline

◆ ~FSoundBuffer()

FSoundBuffer::~FSoundBuffer ( )
virtual

Member Function Documentation

◆ Describe()

FString FSoundBuffer::Describe ( bool  bUseLongName)
virtual

Describe the buffer (platform can override to add to the description, but should call the base class version)

Parameters
bUseLongNamesIf TRUE, this will print out the full path of the sound resource, otherwise, it will show just the object name

◆ EnsureRealtimeTaskCompletion()

virtual void FSoundBuffer::EnsureRealtimeTaskCompletion ( )
inlinevirtual

Forces any pending async realtime source tasks to finish for the buffer

◆ GetChannelsDesc()

FString FSoundBuffer::GetChannelsDesc ( )

Turn the number of channels into a string description

◆ GetCurrentChunkIndex()

virtual int32 FSoundBuffer::GetCurrentChunkIndex ( ) const
inlinevirtual

Gets the chunk index that was last read from (for Streaming Manager requests)

Reimplemented in Audio::FMixerBuffer, and FIOSAudioSoundBuffer.

◆ GetCurrentChunkOffset()

virtual int32 FSoundBuffer::GetCurrentChunkOffset ( ) const
inlinevirtual

Gets the offset into the chunk that was last read to (for Streaming Manager priority)

Reimplemented in Audio::FMixerBuffer, and FIOSAudioSoundBuffer.

◆ GetSoundClassName()

FName FSoundBuffer::GetSoundClassName ( )

Return the name of the sound class for this buffer

This will return the name of the SoundClass of the Sound that this buffer(SoundWave) belongs to. NOTE: This will find the first cue in the ObjectIterator list. So if we are using SoundWaves in multiple places we will pick up the first one only.

◆ IsRealTimeSourceReady()

virtual bool FSoundBuffer::IsRealTimeSourceReady ( )
inlinevirtual

Returns whether or not a real-time decoding buffer is ready for playback

Reimplemented in Audio::FMixerBuffer.

◆ ReadCompressedData()

virtual bool FSoundBuffer::ReadCompressedData ( uint8 Destination,
int32  NumFramesToDecode,
bool  bLooping 
)
inlinevirtual

Reads the next compressed data chunk

Reimplemented in FIOSAudioSoundBuffer.

◆ ReadCompressedInfo()

virtual bool FSoundBuffer::ReadCompressedInfo ( USoundWave SoundWave)
inlinevirtual

Reads the compressed info of the given sound wave. Not implemented on all platforms.

Reimplemented in Audio::FMixerBuffer, and FIOSAudioSoundBuffer.

◆ Seek()

virtual void FSoundBuffer::Seek ( const float  SeekTime)
inlinevirtual

Seeks the buffer to the given seek time

Reimplemented in Audio::FMixerBuffer.

Member Data Documentation

◆ AudioDevice

class FAudioDevice* FSoundBuffer::AudioDevice

Parent Audio Device used when creating the sound buffer. Used to remove tracking info on this sound buffer when its done.

◆ bAllocationInPermanentPool

bool FSoundBuffer::bAllocationInPermanentPool

Whether memory for this buffer has been allocated from permanent pool.

◆ GetSize

virtual int32 FSoundBuffer::GetSize() PURE_VIRTUAL(FSoundBuffer ( void  )

◆ NumChannels

int32 FSoundBuffer::NumChannels

Cumulative channels from all streams

◆ ResourceID

int32 FSoundBuffer::ResourceID

Unique ID that ties this buffer to a USoundWave

◆ ResourceName

FString FSoundBuffer::ResourceName

Human readable name of resource, most likely name of UObject associated during caching.


The documentation for this class was generated from the following files: