From adf9a190956b6da653b57a79d41ba286c5352e55 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Sun, 4 Feb 2018 22:23:51 +0000 Subject: [PATCH] fixup! audio_core: Remove global state --- src/audio_core/hle/hle.cpp | 2 ++ src/audio_core/hle/shared_memory.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/audio_core/hle/hle.cpp b/src/audio_core/hle/hle.cpp index c6fbb3ce0..b13b53ee2 100644 --- a/src/audio_core/hle/hle.cpp +++ b/src/audio_core/hle/hle.cpp @@ -63,6 +63,8 @@ private: }; DspHle::Impl::Impl(DspHle& parent_) : parent(parent_) { + dsp_memory.raw_memory.fill(0); + tick_event = CoreTiming::RegisterEvent("AudioCore::DspHle::tick_event", [this](u64, int cycles_late) { this->AudioTickCallback(cycles_late); diff --git a/src/audio_core/hle/shared_memory.h b/src/audio_core/hle/shared_memory.h index c1c64b2d3..440ab57e5 100644 --- a/src/audio_core/hle/shared_memory.h +++ b/src/audio_core/hle/shared_memory.h @@ -510,7 +510,7 @@ struct SharedMemory { ASSERT_DSP_STRUCT(SharedMemory, 0x8000); union DspMemory { - std::array raw_memory; + std::array raw_memory{}; struct { u8 unused_0[0x50000]; SharedMemory region_0;