A class responsible for managing audio playback with waveform data. More...
#include <ST_AudioPlaybackWaveform.h>
Public Member Functions | |
| virtual EAudioIOType | GetAudioIOType () const override |
| Gets the type of audio I/O for this playback waveform. | |
| Public Member Functions inherited from UST_AudioIOPlaybackBase | |
| 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. | |
| Public Member Functions inherited from UST_AudioIOBase | |
| 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) |
| bool | MA_IsDataAvailable (uint64 PeriodSizeInFrames) |
| void | MA_ReadRealtimePcmRB (uint64 PeriodSizeInFrames, ma_format Format, uint32 Channels) |
| void | MA_DataOrganiser (void *pSamples, uint64 PeriodSizeInFrames, ma_format Format, uint32 Channels) |
| template<typename InterfaceType> | |
| bool | ContainsInterface () const |
| FIntPoint | GetIOId () const |
Static Public Member Functions | |
| static void | MA_PlaybackWaveformCallBack (ma_device *pDevice, void *pOutput, const void *pInput, ma_uint32 frameCount) |
| The callback function for audio playback of waveform data. | |
| Static Public Member Functions inherited from UST_AudioIOPlaybackBase | |
| static void | MA_PlaybackCallBack (ma_device *pDevice, void *pOutput, const void *pInput, ma_uint32 frameCount) |
| Callback for handling audio playback data. | |
| Static Public Member Functions inherited from UST_AudioIOBase | |
| static void | MA_DataAvailable (ma_device *pDevice) |
Protected Member Functions | |
| virtual bool | InitializeAudioIO () override |
| Initializes the audio I/O system for waveform playback. | |
| virtual void | DeinitializeAudioIO () override |
| Deinitializes the audio I/O system for waveform playback. | |
| Protected Member Functions inherited from UST_AudioIOPlaybackBase | |
| 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. | |
| Protected Member Functions inherited from UST_AudioIOBase | |
| 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) |
Protected Attributes | |
| ma_waveform * | Waveform = nullptr |
| The waveform used for audio playback. | |
| Protected Attributes inherited from UST_AudioIOPlaybackBase | |
| ma_device * | PlaybackDevice = nullptr |
| Pointer to the Miniaudio playback device. | |
| ma_decoder * | PlaybackDecoder = nullptr |
| Pointer to the Miniaudio decoder for reading audio data. | |
| Protected Attributes inherited from UST_AudioIOBase | |
| 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. | |
| ma_pcm_rb | RealtimePcmRingBuffer |
| Lock-free PCM ring buffer for passing audio from the realtime callback to the FFT worker thread. | |
| ma_uint32 | RealtimePcmRBFrameCapacity = 0 |
| Fixed maximum number of audio frames the ring buffer can hold. | |
| TArray< uint8 > | RealtimePcmRBBackingMemory |
| Preallocated backing memory used by the ring buffer (no runtime allocations). | |
Additional Inherited Members | |
| Public Attributes inherited from UST_AudioIOBase | |
| 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 Public Attributes inherited from UST_AudioIOBase | |
| static constexpr uint32 | BufferCount = 2 |
A class responsible for managing audio playback with waveform data.
Inherits from UST_AudioIOPlaybackBase and overrides audio I/O functionality for handling audio playback from waveform data.
|
overrideprotectedvirtual |
Deinitializes the audio I/O system for waveform playback.
This function ensures proper cleanup of any resources used by the playback system.
Reimplemented from UST_AudioIOPlaybackBase.
|
inlineoverridevirtual |
Gets the type of audio I/O for this playback waveform.
Override to return the specific type for playback. This will indicate how the waveform is being played back and processed.
Reimplemented from UST_AudioIOBase.
|
overrideprotectedvirtual |
Initializes the audio I/O system for waveform playback.
This function sets up the necessary configuration for waveform audio playback. It overrides the base class method to ensure proper setup for playback.
Reimplemented from UST_AudioIOBase.
|
static |
The callback function for audio playback of waveform data.
This function is called during the audio playback process, providing the necessary data to the audio device for output.
| pDevice | The audio device to which the output is being sent. |
| pOutput | Pointer to the output buffer for audio data. |
| pInput | Pointer to the input buffer, if needed. |
| frameCount | The number of frames to process. |
|
protected |
The waveform used for audio playback.
This pointer holds the waveform data to be used for playback.