A class responsible for managing audio playback. More...
#include <ST_AudioPlaybackPlayer.h>
Public Member Functions | |
virtual EAudioIOType | GetAudioIOType () const override |
Gets the type of audio I/O for this playback player. | |
![]() | |
bool | IsPlaying () const |
Checks whether audio playback is currently active. | |
FDecoderConfig | GetDecoderConfig () const |
Returns the configuration of the audio decoder. | |
virtual EST_SampleFormat | GetAudioFormat () const override |
Returns the current audio format. | |
![]() | |
UST_AudioIOBase () | |
~UST_AudioIOBase () | |
bool | Activate () |
void | Deactivate () |
FAudioIOConfig | GetAudioIOConfig () const |
FFFTIOData | GetFFTIOData () const |
bool | RegisterSampler (UObject *Sampler, bool bSamplerActivates=false) |
void | DeregisterSampler (UObject *Sampler, bool bZeroSamplersDeactivates=false) |
template<typename InterfaceType> | |
bool | ContainsInterface () const |
FIntPoint | GetIOId () const |
Protected Member Functions | |
virtual bool | InitializeAudioIO () override |
Initializes the audio I/O system for playback. | |
![]() | |
virtual void | DeinitializeAudioIO () override |
Deinitializes the audio IO subsystem, including device shutdown. | |
virtual ma_decoder * | GetPlaybackDecoder () const override |
Retrieves the active audio decoder for playback. | |
void | SetIsPlaying (bool value) |
Sets whether the system is currently playing audio. | |
![]() | |
virtual void | Initialize (FSubsystemCollectionBase &Collection) override |
virtual void | Deinitialize () override |
void | BuildFFTIOData (uint32 PeriodSizeInFrames, ma_format Format, uint32 SampleRate, uint32 Channels) |
void | DeinitializeFFT () |
virtual ma_encoder * | GetCaptureEncoder () const |
void | GetDeviceInfo (EAudioIOType AudioIOType, FString FindDeviceName) |
Additional Inherited Members | |
![]() | |
static void | MA_PlaybackCallBack (ma_device *pDevice, void *pOutput, const void *pInput, ma_uint32 frameCount) |
Callback for handling audio playback data. | |
![]() | |
static void | MA_DataOrganiser (ma_device *pDevice, void *pSamples, uint64 PeriodSizeInFrames, ma_format Format, uint32 Channels) |
![]() | |
FCriticalSection | AudioBufferLock |
void * | SampledAudioBuffers [BufferCount] = { nullptr, nullptr } |
void * | CurrentAudioBuffer = nullptr |
std::atomic< uint32 > | ReadIndex |
std::atomic< uint32 > | WriteIndex |
FOnAudioIOStatusChanged | OnAudioIOStatusChanged |
FOnRawMagnitudesReady | OnRawMagnitudesReady |
FOnFrequencyBandsReady | OnFrequencyBandsReady |
FOnAmplitudesReady | OnAmplitudesReady |
FOnPitchesReady | OnPitchesReady |
FOnBeatDetected | OnBeatDetected |
![]() | |
static constexpr uint32 | BufferCount = 2 |
![]() | |
ma_device * | PlaybackDevice = nullptr |
Pointer to the Miniaudio playback device. | |
ma_decoder * | PlaybackDecoder = nullptr |
Pointer to the Miniaudio decoder for reading audio data. | |
![]() | |
bool | bActivated = false |
bool | bIsProcessingFFT = false |
FCriticalSection | SamplerRegistrationMutex |
TArray< UObject * > | RegisteredSamplers |
ma_device_id * | pDeviceID = NULL |
Pointer to the selected device ID. | |
ma_device_info * | pPlaybackDeviceInfos = nullptr |
Playback device information. | |
ma_device_info * | pCaptureDeviceInfos = nullptr |
Capture device information. | |
ma_uint32 | playbackDeviceCount = 0 |
Number of playback devices found. | |
ma_uint32 | captureDeviceCount = 0 |
Number of capture devices found. | |
FFFTIOData | CachedFFTIOData |
Cached FFT IO data. | |
FAudioIOConfig | CachedAudioIOConfig |
Cached audio IO configuration. | |
A class responsible for managing audio playback.
Inherits from UST_AudioIOPlaybackBase and overrides audio IO functionality for handling audio playback.
|
inlineoverridevirtual |
Gets the type of audio I/O for this playback player.
Override to return the specific type for playback. The I/O type indicates whether the audio is being played back from a device, file, or other source.
Reimplemented from UST_AudioIOBase.
|
overrideprotectedvirtual |
Initializes the audio I/O system for playback.
This function sets up the necessary configuration for audio playback. It overrides the base class method to ensure the playback system is initialized correctly for the player.
Reimplemented from UST_AudioIOBase.