You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UE-63558 fix crash that occurs when attempting to recover an interrupted recording on audio device shutdown.
#rb none #ROBOMERGE-OWNER: ryan.gerleve #ROBOMERGE-AUTHOR: ethan.geller #ROBOMERGE-SOURCE: CL 8664067 via CL 8670457 via CL 8670622 #ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking) (v422-8689730) [CL 8764690 by ethan geller in Dev-Networking branch]
This commit is contained in:
@@ -10,6 +10,14 @@
|
||||
// Link to "Audio" profiling category
|
||||
CSV_DECLARE_CATEGORY_MODULE_EXTERN(AUDIOMIXERCORE_API, Audio);
|
||||
|
||||
static int32 RecoverRecordingOnShutdownCVar = 0;
|
||||
FAutoConsoleVariableRef CVarRecoverRecordingOnShutdown(
|
||||
TEXT("au.RecoverRecordingOnShutdown"),
|
||||
RecoverRecordingOnShutdownCVar,
|
||||
TEXT("When set to 1, we will attempt to bounce the recording to a wav file if the game is shutdown while a recording is in flight.\n")
|
||||
TEXT("0: Disabled, 1: Enabled"),
|
||||
ECVF_Default);
|
||||
|
||||
namespace Audio
|
||||
{
|
||||
// Unique IDs for mixer submixe's
|
||||
@@ -49,7 +57,7 @@ namespace Audio
|
||||
TearDownAmbisonicsDecoder();
|
||||
}
|
||||
|
||||
if (OwningSubmixObject && bIsRecording)
|
||||
if (RecoverRecordingOnShutdownCVar && OwningSubmixObject && bIsRecording)
|
||||
{
|
||||
FString InterruptedFileName = TEXT("InterruptedRecording.wav");
|
||||
UE_LOG(LogAudioMixer, Warning, TEXT("Recording of Submix %s was interrupted. Saving interrupted recording as %s."), *(OwningSubmixObject->GetName()), *InterruptedFileName);
|
||||
|
||||
Reference in New Issue
Block a user