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

From 7ed447d78213a1e9885de96269fd512f4dae728b 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
---
 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 34ac057..e4e3661 100644
--- a/gme/Spc_Dsp.cpp
+++ b/gme/Spc_Dsp.cpp
@@ -658,6 +658,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 9fba74d..ea636cf 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