VJ Master 1.3
Real-time audio analysis and visualisation.
 
Loading...
Searching...
No Matches
UST_AudioPlaybackNoise Class Reference

A class responsible for managing audio playback with noise data. More...

#include <ST_AudioPlaybackNoise.h>

Public Member Functions

virtual EAudioIOType GetAudioIOType () const override
 Gets the type of audio I/O for this playback noise.
 
- 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)
 
template<typename InterfaceType>
bool ContainsInterface () const
 
FIntPoint GetIOId () const
 

Static Public Member Functions

static void MA_PlaybackNoiseCallBack (ma_device *pDevice, void *pOutput, const void *pInput, ma_uint32 frameCount)
 The callback function for audio playback of noise 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_DataOrganiser (ma_device *pDevice, void *pSamples, uint64 PeriodSizeInFrames, ma_format Format, uint32 Channels)
 

Protected Member Functions

virtual bool InitializeAudioIO () override
 Initializes the audio I/O system for noise playback.
 
virtual void DeinitializeAudioIO () override
 Deinitializes the audio I/O system for noise 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_noise * Noise = nullptr
 The noise used for audio playback.
 
ma_allocation_callbacks * pAllocationCallbacks = nullptr
 Custom memory routine.
 
- 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.
 

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
 

Detailed Description

A class responsible for managing audio playback with noise data.

Inherits from UST_AudioIOPlaybackBase and overrides audio I/O functionality for handling audio playback from noise data.

Member Function Documentation

◆ DeinitializeAudioIO()

void UST_AudioPlaybackNoise::DeinitializeAudioIO ( )
overrideprotectedvirtual

Deinitializes the audio I/O system for noise playback.

This function ensures proper cleanup of any resources used by the playback system.

Reimplemented from UST_AudioIOPlaybackBase.

◆ GetAudioIOType()

EAudioIOType UST_AudioPlaybackNoise::GetAudioIOType ( ) const
inlineoverridevirtual

Gets the type of audio I/O for this playback noise.

Override to return the specific type for playback. This will indicate how the noise is being played back and processed.

Returns
The type of the audio I/O, typically an EAudioIOType enumeration.

Reimplemented from UST_AudioIOBase.

◆ InitializeAudioIO()

bool UST_AudioPlaybackNoise::InitializeAudioIO ( )
overrideprotectedvirtual

Initializes the audio I/O system for noise playback.

This function sets up the necessary configuration for noise audio playback. It overrides the base class method to ensure proper setup for playback.

Returns
true if initialization was successful; false otherwise.

Reimplemented from UST_AudioIOBase.

◆ MA_PlaybackNoiseCallBack()

void UST_AudioPlaybackNoise::MA_PlaybackNoiseCallBack ( ma_device * pDevice,
void * pOutput,
const void * pInput,
ma_uint32 frameCount )
static

The callback function for audio playback of noise data.

This function is called during the audio playback process, providing the necessary data to the audio device for output.

Parameters
pDeviceThe audio device to which the output is being sent.
pOutputPointer to the output buffer for audio data.
pInputPointer to the input buffer, if needed.
frameCountThe number of frames to process.

Member Data Documentation

◆ Noise

ma_noise* UST_AudioPlaybackNoise::Noise = nullptr
protected

The noise used for audio playback.

This pointer holds the noise data to be used for playback.

◆ pAllocationCallbacks

ma_allocation_callbacks* UST_AudioPlaybackNoise::pAllocationCallbacks = nullptr
protected

Custom memory routine.

This pointer holds the noise data to be used for playback.


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