Navigation
API > API/Plugins > API/Plugins/PixelStreaming
An `ISoundGenerator_ implementation to pump some audio from WebRTC into this synth component
| Name | FWebRTCSoundGenerator |
| Type | class |
| Header File | /Engine/Plugins/Media/PixelStreaming/Source/PixelStreaming/Public/PixelStreamingAudioComponent.h |
| Include Path | #include "PixelStreamingAudioComponent.h" |
Syntax
class FWebRTCSoundGenerator : public ISoundGenerator
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FWebRTCSoundGenerator() |
PixelStreamingAudioComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bGeneratingAudio | FThreadSafeBool | PixelStreamingAudioComponent.h | ||
| bShouldGenerateAudio | FThreadSafeBool | PixelStreamingAudioComponent.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Buffer | TArray< int16_t > | PixelStreamingAudioComponent.h | ||
| CriticalSection | FCriticalSection | PixelStreamingAudioComponent.h | ||
| Params | FSoundGeneratorInitParams | PixelStreamingAudioComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddAudio
(
const int16_t* AudioData, |
PixelStreamingAudioComponent.h | ||
void EmptyBuffers() |
PixelStreamingAudioComponent.h | ||
int32 GetNumChannels() |
PixelStreamingAudioComponent.h | ||
int32 GetSampleRate() |
PixelStreamingAudioComponent.h | ||
void SetParameters
(
const FSoundGeneratorInitParams& InitParams |
PixelStreamingAudioComponent.h |
Overridden from ISoundGenerator
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual int32 GetDesiredNumSamplesToRenderPerCallback() |
Returns the number of samples to render per callback. | PixelStreamingAudioComponent.h | |
virtual bool IsFinished() |
Optional. Can be overridden to end the sound when generating is finished. | PixelStreamingAudioComponent.h | |
virtual void OnBeginGenerate() |
Optional. Called on audio generator thread right when the generator begins generating. | PixelStreamingAudioComponent.h | |
virtual void OnEndGenerate() |
Optional. Called on audio generator thread right when the generator ends generating. | PixelStreamingAudioComponent.h | |
virtual int32 OnGenerateAudio
(
float* OutAudio, |
Called when a new buffer is required. | PixelStreamingAudioComponent.h |