game-music-emu: Spc_Dsp.cpp: Added constructor to init the state (a4605)

From a46054a3db9a7efd71e220f9255fc3e07fe76693 Mon Sep 17 00:00:00 2001
From: Wohlstand <[EMAIL REDACTED]>
Date: Tue, 24 Oct 2023 02:58:16 +0300
Subject: [PATCH] Spc_Dsp.cpp: Added constructor to init the state

#57
(cherry picked from commit 7ed447d78213a1e9885de96269fd512f4dae728b)
---
 gme/Spc_Dsp.cpp | 5 +++++
 gme/Spc_Dsp.h   | 1 +
 2 files changed, 6 insertions(+)

diff --git a/gme/Spc_Dsp.cpp b/gme/Spc_Dsp.cpp
index b4f85c0..f0fd7a4 100644
--- a/gme/Spc_Dsp.cpp
+++ b/gme/Spc_Dsp.cpp
@@ -647,6 +647,11 @@ void Spc_Dsp::mute_voices( int mask )
 	}
 }
 
+Spc_Dsp::Spc_Dsp()
+{
+	memset(&m, 0, sizeof(state_t));
+}
+
 void Spc_Dsp::init( void* ram_64k )
 {
 	m.ram = (uint8_t*) ram_64k;
diff --git a/gme/Spc_Dsp.h b/gme/Spc_Dsp.h
index b4379ca..dbbfdcf 100644
--- a/gme/Spc_Dsp.h
+++ b/gme/Spc_Dsp.h
@@ -8,6 +8,7 @@
 
 struct Spc_Dsp {
 public:
+	Spc_Dsp();
 // Setup
 	
 	// Initializes DSP and has it use the 64K RAM provided