Sequencer.Audio.PlayAudioWhenPlaybackJumps
Sequencer.Audio.PlayAudioWhenPlaybackJumps
#Overview
name: Sequencer.Audio.PlayAudioWhenPlaybackJumps
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Play audio when playback jumps.\n
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Sequencer.Audio.PlayAudioWhenPlaybackJumps is to control whether audio should be played when the sequencer playback jumps to a different time. This setting is part of Unreal Engine’s Sequencer system, which is used for creating and editing cinematic sequences and gameplay cutscenes.
This setting variable is primarily used in the MovieSceneTracks module, specifically within the MovieSceneAudioSystem. It affects how audio is handled during playback jumps in the sequencer.
The value of this variable is set through a console variable (CVar) system. It’s initialized as a static boolean variable bPlayAudioWhenPlaybackJumps
and linked to the console variable “Sequencer.Audio.PlayAudioWhenPlaybackJumps” using FAutoConsoleVariableRef.
The associated variable bPlayAudioWhenPlaybackJumps
directly interacts with this setting. They share the same value, and bPlayAudioWhenPlaybackJumps
is used in the actual logic of the audio system.
Developers must be aware that this setting affects the behavior of audio playback during sequencer jumps. When set to false (the default), audio will not play when the sequencer jumps to a different time. When set to true, audio will play even during jumps.
Best practices when using this variable include:
- Consider the desired user experience in your sequences. If you want seamless audio during timeline scrubbing or jumping, you might want to enable this.
- Be mindful of performance implications. Playing audio during jumps might introduce additional processing overhead.
- Use this in conjunction with other sequencer audio settings for fine-tuned control over audio behavior.
Regarding the associated variable bPlayAudioWhenPlaybackJumps
:
This is the actual boolean variable that controls the behavior in the code. It’s used in the GetAudioEvaluationType
function to determine whether to skip audio evaluation when the sequencer is jumping. Developers should not modify this variable directly, but instead use the console variable “Sequencer.Audio.PlayAudioWhenPlaybackJumps” to change its value. This ensures that the setting is changed consistently across the engine.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneTracks/Private/Systems/MovieSceneAudioSystem.cpp:46
Scope: file
Source code excerpt:
static bool bPlayAudioWhenPlaybackJumps = false;
FAutoConsoleVariableRef CVarPlayAudioWhenPlaybackJumps(
TEXT("Sequencer.Audio.PlayAudioWhenPlaybackJumps"),
bPlayAudioWhenPlaybackJumps,
TEXT("Play audio when playback jumps.\n"),
ECVF_Default);
namespace UE::MovieScene
{
#Associated Variable and Callsites
This variable is associated with another variable named bPlayAudioWhenPlaybackJumps
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneTracks/Private/Systems/MovieSceneAudioSystem.cpp:44
Scope: file
Source code excerpt:
ECVF_Default);
static bool bPlayAudioWhenPlaybackJumps = false;
FAutoConsoleVariableRef CVarPlayAudioWhenPlaybackJumps(
TEXT("Sequencer.Audio.PlayAudioWhenPlaybackJumps"),
bPlayAudioWhenPlaybackJumps,
TEXT("Play audio when playback jumps.\n"),
ECVF_Default);
namespace UE::MovieScene
{
#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneTracks/Private/Systems/MovieSceneAudioSystem.cpp:226
Scope (from outer to inner):
file
namespace UE::MovieScene
function static EAudioEvaluationType GetAudioEvaluationType
Source code excerpt:
{
if (Context.GetStatus() == EMovieScenePlayerStatus::Jumping &&
!bPlayAudioWhenPlaybackJumps)
{
return EAudioEvaluationType::Skip;
}
if (Context.HasJumped())
{