From 201a67170969f7419fd4b062db87af81e90c0ad9 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 21 Nov 2022 12:55:24 +1000 Subject: [PATCH] System: Fix dumping audio on boot --- src/core/spu.cpp | 2 +- src/core/system.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/spu.cpp b/src/core/spu.cpp index 0caf6d4af..ddb66b937 100644 --- a/src/core/spu.cpp +++ b/src/core/spu.cpp @@ -450,9 +450,9 @@ void SPU::CPUClockChanged() void SPU::Shutdown() { + StopDumpingAudio(); s_tick_event.reset(); s_transfer_event.reset(); - s_dump_writer.reset(); s_audio_stream.reset(); } diff --git a/src/core/system.cpp b/src/core/system.cpp index 2ef782cd5..059e4e50c 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -1273,6 +1273,9 @@ bool System::BootSystem(SystemBootParameters parameters) if (parameters.load_image_to_ram || g_settings.cdrom_load_image_to_ram) g_cdrom.PrecacheMedia(); + if (g_settings.audio_dump_on_boot) + StartDumpingAudio(); + ResetPerformanceCounters(); if (IsRunning()) UpdateSpeedLimiterState();