au.MetaSound.Experimental.DynamicOperatorTransformTimeoutInSeconds

au.MetaSound.Experimental.DynamicOperatorTransformTimeoutInSeconds

#Overview

name: au.MetaSound.Experimental.DynamicOperatorTransformTimeoutInSeconds

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of au.MetaSound.Experimental.DynamicOperatorTransformTimeoutInSeconds is to control the time allowed for processing pending dynamic graph transformations in a single MetaSound render cycle within the Unreal Engine’s MetaSound system.

This setting variable is primarily used by the MetaSound subsystem, which is part of Unreal Engine’s audio system. It’s specifically utilized in the MetasoundGraphCore module, as evident from the file path.

The value of this variable is set through the Unreal Engine’s console variable system. It’s initialized with a default value of 0.010 seconds (10 milliseconds) and can be modified at runtime using console commands.

The associated variable MetaSoundExperimentalTransformTimeoutInSeconds directly interacts with au.MetaSound.Experimental.DynamicOperatorTransformTimeoutInSeconds. They share the same value, with MetaSoundExperimentalTransformTimeoutInSeconds being the actual variable used in the code logic.

Developers must be aware that:

  1. Setting this value to less than zero disables the timeout feature.
  2. Setting it to greater than zero enables the timeout feature.
  3. The default value is 0.010 seconds, which might be suitable for most cases but could need adjustment based on specific project requirements.

Best practices when using this variable include:

  1. Monitor performance impact when adjusting this value, as it directly affects the time spent on graph transformations in each render cycle.
  2. Consider disabling it (setting to less than zero) if dynamic graph transformations are not being used or if they’re causing performance issues.
  3. Increase the value if complex dynamic graph transformations are being cut off prematurely.
  4. Use profiling tools to determine the optimal value for your specific use case.

Regarding the associated variable MetaSoundExperimentalTransformTimeoutInSeconds:

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundGraphCore/Private/MetasoundDynamicOperator.cpp:38

Scope (from outer to inner):

file
namespace    Metasound
namespace    DynamicGraph
namespace    DynamicOperatorPrivate

Source code excerpt:

			float MetaSoundExperimentalTransformTimeoutInSeconds = 0.010f;
			FAutoConsoleVariableRef CVarMetaSoundExperimentalTransformTimeoutInSeconds(
				TEXT("au.MetaSound.Experimental.DynamicOperatorTransformTimeoutInSeconds"),
				MetaSoundExperimentalTransformTimeoutInSeconds,
				TEXT("Sets the number of seconds allowed to process pending dynamic graph transformations for a single MetaSound render cycle .\n")
				TEXT("[Less than zero]: Disabled, [Greater than zero]: Enabled, 0.010s (default)"),
				ECVF_Default);
			
			// Table sorter helper so we don't rewrite this algorithm for each differe

#Associated Variable and Callsites

This variable is associated with another variable named MetaSoundExperimentalTransformTimeoutInSeconds. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundGraphCore/Private/MetasoundDynamicOperator.cpp:36

Scope (from outer to inner):

file
namespace    Metasound
namespace    DynamicGraph
namespace    DynamicOperatorPrivate

Source code excerpt:

		namespace DynamicOperatorPrivate
		{
			float MetaSoundExperimentalTransformTimeoutInSeconds = 0.010f;
			FAutoConsoleVariableRef CVarMetaSoundExperimentalTransformTimeoutInSeconds(
				TEXT("au.MetaSound.Experimental.DynamicOperatorTransformTimeoutInSeconds"),
				MetaSoundExperimentalTransformTimeoutInSeconds,
				TEXT("Sets the number of seconds allowed to process pending dynamic graph transformations for a single MetaSound render cycle .\n")
				TEXT("[Less than zero]: Disabled, [Greater than zero]: Enabled, 0.010s (default)"),
				ECVF_Default);
			
			// Table sorter helper so we don't rewrite this algorithm for each differe
			// stack type (Execute/PostExecute/Reset)

#Loc: <Workspace>/Engine/Plugins/Runtime/Metasound/Source/MetasoundGraphCore/Private/MetasoundDynamicOperator.cpp:222

Scope (from outer to inner):

file
namespace    Metasound
namespace    DynamicGraph
function     void FDynamicOperator::Execute

Source code excerpt:

			using namespace DynamicOperatorPrivate;

			if (MetaSoundExperimentalTransformTimeoutInSeconds > 0)
			{
				ApplyTransformsUntilFenceOrTimeout(MetaSoundExperimentalTransformTimeoutInSeconds);
			}
			else
			{
				ApplyTransformsUntilFence();
			}