Navigation
API > API/Runtime > API/Runtime/Engine
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/Audio.h |
| Include | #include "Audio.h" |
Syntax
class FSoundSource
Variables
| Type | Name | Description | |
|---|---|---|---|
| FAudioDevice * | AudioDevice | Owning audio device. | |
| uint8: 1 | bInitialized | Whether or not the sound source is initialized. | |
| uint8: 1 | bIsManuallyPaused | Whether or not we were paused manually. | |
| uint8: 1 | bIsPausedByGame | Whether we are paused by game state or not. | |
| uint8: 1 | bIsPreviewSound | Whether or not the sound is a preview sound. | |
| uint32: 1 | bIsVirtual | True if this isn't a real hardware voice | |
| uint8: 1 | bReverbApplied | Cached sound mode value used to detect when to switch outputs. | |
| FSoundBuffer * | Buffer | Cached sound buffer associated with currently bound wave instance. | |
| TSharedPtr< FDebugInfo, ESPMode::ThreadSafe > | DebugInfo | ||
| float | HPFFrequency | What frequency to set the HPF filter to. Note this could be caused by HPF distance attenuation. | |
| int32 | LastHeardUpdate | Last tick when this source was active and had a hearable volume | |
| float | LastHPFFrequency | The last HPF frequency set. Used to avoid making API calls when parameter doesn't changing. | |
| float | LastLPFFrequency | The last LPF frequency set. Used to avoid making API calls when parameter doesn't changing. | |
| int32 | LastUpdate | Last tick when this source was active | |
| FVector | LeftChannelSourceLocation | The location of the left-channel source for stereo spatialization. | |
| float | LFEBleed | The amount of a sound to bleed to the LFE speaker | |
| float | LPFFrequency | What frequency to set the LPF filter to. | |
| int32 | NumFramesPlayed | The number of frames (Samples / NumChannels) played by the sound source. | |
| int32 | NumTotalFrames | The total number of frames of audio for the sound wave | |
| uint8: 1 | Paused | Whether or not we are actually paused. | |
| float | Pitch | The pitch of the sound source. | |
| float | PlaybackTime | The virtual current playback time. Used to trigger notifications when finished. | |
| FThreadSafeBool | Playing | Whether we are playing or not. | |
| FVector | RightChannelSourceLocation | The location of the right-channel source for stereo spatialization. | |
| int32 | StartFrame | The frame we started on. | |
| int32 | TickCount | Update tick count. Used to stop oldest stopping sound source. | |
| uint32 | VoiceId | Effect ID of this sound source in the audio device sound source array. | |
| FWaveInstance * | WaveInstance | Contained wave instance. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FSoundSource
(
FAudioDevice* InAudioDevice |
Constructor |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Destructor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FString | Describe
(
bool bUseLongName |
Returns a string describing the source (subclass can override, but it should call the base and append). | |
| const FSoundBuffer * | GetBuffer () |
Returns the contained sound buffer object. | |
| void | GetChannelLocations
(
FVector& Left, |
||
| float | GetDebugVolume
(
const float InVolume |
Returns the volume of the sound source after evaluating debug commands | |
| float | Returns the source's envelope at the callback block rate. Only implemented in audio mixer. | ||
| float | Returns the source's playback percent. | ||
| FSpatializationParams | Gets parameters necessary for computing 3d spatialization of sources. | ||
| const FWaveInstance * | Returns the wave instance of the sound source. | ||
| bool | Init
(
FWaveInstance* InWaveInstance |
Initializes the sound source. | |
| void | InitCommon () |
Initializes common data for all sound source types. | |
| void | InitializeSourceEffects
(
uint32 InEffectVoiceId |
Initializes any source effects for this sound source. | |
| bool | IsFinished () |
Returns true if the sound source has finished playing. | |
| bool | IsGameOnly () |
Returns source is an in-game only. Will pause when in UI. | |
| bool | Returns whether or not the sound source has initialized. | ||
| bool | IsPaused () |
Returns true if the sound is paused. | |
| bool | Returns true if the sound is paused. | ||
| bool | |||
| bool | IsPlaying () |
Returns whether or not the sound source is playing. | |
| bool | Returns if the source voice is prepared to initialize. | ||
| bool | Returns true if reverb should be applied. | ||
| bool | IsStopping () |
Whether or not the source is stopping. Only implemented in audio mixer. | |
| void | |||
| void | Pause () |
Pauses the sound source. | |
| void | Play () |
Plays the sound source. | |
| bool | PrepareForInitialization
(
FWaveInstance* InWaveInstance |
Prepares the source voice for initialization. | |
| void | Updates the FilterFrequency value. | ||
| float | SetLFEBleed () |
Updates and sets the LFEBleed variable. | |
| void | SetPauseByGame
(
bool bInIsPauseByGame |
Pause the source from game pause | |
| void | SetPauseManually
(
bool bInIsPauseManually |
Pause the source manually | |
| bool | SetReverbApplied
(
bool bHardwareAvailable |
Set the bReverbApplied variable. | |
| void | SetVirtual () |
Sets if this voice is virtual. | |
| void | Stop () |
Stops the sound source. | |
| void | StopNow () |
||
| void | Update () |
Updates the sound source. | |
| void | UpdateCommon () |
Updates common data for all sound source types. | |
| void | UpdatePause () |
Updates this source's pause state | |
| void | Updates the stereo emitter positions of this voice. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FDebugInfo | Struct containing the debug state of a SoundSource |