SourceDataOverridePlugin

SourceDataOverridePlugin

#Overview

name: SourceDataOverridePlugin

The value of this variable can be defined or overridden in .ini config files. 2 .ini config files referencing this setting variable.

It is referenced in 8 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of SourceDataOverridePlugin is to specify which plugin should be used for overriding audio source data in the Unreal Engine audio system. This setting allows developers to customize how audio source data is processed or manipulated before it’s used in the game’s audio playback.

This setting variable is primarily used in the audio subsystem of Unreal Engine, specifically within the AudioMixer module. It’s also referenced in various platform-specific settings classes, indicating that it can be configured differently for different target platforms.

The value of this variable is set in the project settings, specifically in the Audio category of the target platform settings (e.g., Windows, Mac, Linux, Android, iOS). It’s defined as a config property, meaning it can be modified in the project’s configuration files or through the Unreal Editor interface.

The SourceDataOverridePlugin interacts with the audio mixer source manager (FMixerSourceManager) and is used to initialize and process audio data. It’s closely related to other audio plugin settings like ReverbPlugin and OcclusionPlugin.

Developers should be aware that:

  1. This setting is platform-specific, so it may need to be configured separately for each target platform.
  2. The plugin specified must be enabled and compatible with the target platform.
  3. Using a source data override plugin may impact audio performance and should be tested thoroughly.

Best practices when using this variable include:

  1. Only use it when custom audio source data processing is necessary for your project.
  2. Ensure the specified plugin is properly implemented and optimized for your target platforms.
  3. Test the audio performance with and without the plugin to understand its impact.
  4. Keep the setting consistent across development machines to avoid unexpected behavior.
  5. Document the use of this plugin and its effects on the project’s audio pipeline for other team members.

#Setting Variables

#References In INI files

Location: <Workspace>/Projects/Lyra/Config/DefaultEngine.ini:308, section: [/Script/WindowsTargetPlatform.WindowsTargetSettings]

Location: <Workspace>/Projects/Lyra/Config/DefaultEngine.ini:382, section: [/Script/LinuxTargetPlatform.LinuxTargetSettings]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Developer/Linux/LinuxTargetPlatform/Classes/LinuxTargetSettings.h:29

Scope (from outer to inner):

file
class        class ULinuxTargetSettings : public UObject

Source code excerpt:

	/** Which of the currently enabled source data override plugins to use. */
	UPROPERTY(config, EditAnywhere, Category = "Audio")
	FString SourceDataOverridePlugin;

	/** Which of the currently enabled reverb plugins to use. */
	UPROPERTY(config, EditAnywhere, Category = "Audio")
	FString ReverbPlugin;

	/** Which of the currently enabled occlusion plugins to use. */

#Loc: <Workspace>/Engine/Source/Developer/Mac/MacTargetPlatform/Classes/MacTargetSettings.h:153

Scope (from outer to inner):

file
class        class UMacTargetSettings : public UObject

Source code excerpt:

	/** Which of the currently enabled source data override plugins to use. */
	UPROPERTY(config, EditAnywhere, Category = "Audio")
	FString SourceDataOverridePlugin;

	/** Which of the currently enabled reverb plugins to use. */
	UPROPERTY(config, EditAnywhere, Category = "Audio")
	FString ReverbPlugin;

	/** Which of the currently enabled occlusion plugins to use. */

#Loc: <Workspace>/Engine/Source/Developer/Windows/WindowsTargetPlatform/Classes/WindowsTargetSettings.h:90

Scope (from outer to inner):

file
class        class UWindowsTargetSettings : public UObject

Source code excerpt:

	/** Which of the currently enabled source data override plugins to use. */
	UPROPERTY(config, EditAnywhere, Category = "Audio")
	FString SourceDataOverridePlugin;

	/** Which of the currently enabled reverb plugins to use. */
	UPROPERTY(config, EditAnywhere, Category = "Audio")
	FString ReverbPlugin;

	/** Which of the currently enabled occlusion plugins to use. */

#Loc: <Workspace>/Engine/Source/Runtime/Android/AndroidRuntimeSettings/Classes/AndroidRuntimeSettings.h:588

Scope (from outer to inner):

file
class        class UAndroidRuntimeSettings : public UObject

Source code excerpt:

	/** Which of the currently enabled source data override plugins to use. */
	UPROPERTY(config, EditAnywhere, Category = "Audio")
	FString SourceDataOverridePlugin;

	/** Which of the currently enabled reverb plugins to use. */
	UPROPERTY(config, EditAnywhere, Category = "Audio")
	FString ReverbPlugin;

	/** Which of the currently enabled occlusion plugins to use. */

#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerSourceManager.cpp:436

Scope (from outer to inner):

file
namespace    Audio
function     void FMixerSourceManager::Init

Source code excerpt:

		}
		// Cache the source data override plugin
		SourceDataOverridePlugin = MixerDevice->SourceDataOverridePluginInterface;
		if (SourceDataOverridePlugin.IsValid())
		{
			bUsingSourceDataOverridePlugin = true;
		}

		// Spam command queue with nops.
		static FAutoConsoleCommand SpamNopsCmd(

#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerSourceManager.cpp:3319

Scope (from outer to inner):

file
namespace    Audio
function     void FMixerSourceManager::ComputeNextBlockOfSamples

Source code excerpt:

		{
			RenderThreadPhase = ESourceManagerRenderThreadPhase::SourceDataOverride_OnAllSourcesProcessed;
			AUDIO_MIXER_CHECK(SourceDataOverridePlugin.IsValid());
			LLM_SCOPE(ELLMTag::AudioMixerPlugins);
			SourceDataOverridePlugin->OnAllSourcesProcessed();
		}

		// Update the game thread copy of source doneness
		RenderThreadPhase = ESourceManagerRenderThreadPhase::UpdateGameThreadCopies;
		for (int32 SourceId = 0; SourceId < NumTotalSources; ++SourceId)
		{		

#Loc: <Workspace>/Engine/Source/Runtime/AudioMixer/Private/AudioMixerSourceManager.h:411

Scope (from outer to inner):

file
namespace    Audio
class        class FMixerSourceManager

Source code excerpt:

		
		// Cached ptr to an optional source data override plugin
		TAudioSourceDataOverridePtr SourceDataOverridePlugin;

		IAudioLinkFactory* AudioLinkFactory = nullptr;

		// Array of pointers to game thread audio source objects
		TArray<FMixerSourceVoice*> MixerSources;

#Loc: <Workspace>/Engine/Source/Runtime/IOS/IOSRuntimeSettings/Classes/IOSRuntimeSettings.h:531

Scope (from outer to inner):

file
class        class UIOSRuntimeSettings : public UObject

Source code excerpt:

	/** Which of the currently enabled source data override plugins to use. */
	UPROPERTY(config, EditAnywhere, Category = "Audio")
	FString SourceDataOverridePlugin;

	/** Which of the currently enabled reverb plugins to use. */
	UPROPERTY(config, EditAnywhere, Category = "Audio")
	FString ReverbPlugin;

	/** Which of the currently enabled occlusion plugins to use. */