Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/SMetasoundRenderStats.h
phil popp 56737d13eb MetaSound Graph Render Cost
The main elements of this change are:
- Incorporation of "Relative Render Cost" to the AudioDevice in order to do more nuanced voice limiting
- Added a method for tracking a RenderCost in MetaSounds
- Live information on RenderCost is displayed in the MetaSound editor when a sound is previewed

There was some small cleanup as well
- Moved the GraphHierarhcy MetaSound environment variable
- Renamed the MetaSound Environment Variable  TransmissionID to InstanceID
- Put CPU cost and Render Cost into their own widget in the MS editor.

#jira UE-215467
#rb Rob.Gay, Jimmy.Smith

[CL 34020333 by phil popp in ue5-main branch]
2024-05-30 19:36:18 -04:00

31 lines
740 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Templates/SharedPointer.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Widgets/SBoxPanel.h"
class UMetaSoundSource;
class STextBlock;
/** Widget for displaying render stats of a previewing MetaSound.. */
class SMetaSoundRenderStats : public SVerticalBox
{
public:
SLATE_BEGIN_ARGS( SMetaSoundRenderStats) {};
SLATE_END_ARGS()
void Construct(const FArguments& InArgs);
void Update(bool bIsPlaying, const UMetaSoundSource* InSource);
private:
TSharedPtr<STextBlock> RenderStatsCostWidget;
TSharedPtr<STextBlock> RenderStatsCPUWidget;
bool bPreviousIsPlaying = false;
double MaxCPUCoreUtilization = 0;
float MaxRelativeRenderCost = 0.f;
};