about summary refs log tree commit diff
path: root/src/engine/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/client')
-rw-r--r--src/engine/client/sound.cpp2
-rw-r--r--src/engine/client/sound.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/engine/client/sound.cpp b/src/engine/client/sound.cpp
index 4678bb8a..52f51bcb 100644
--- a/src/engine/client/sound.cpp
+++ b/src/engine/client/sound.cpp
@@ -54,7 +54,6 @@ static CVoice m_aVoices[NUM_VOICES] = { {0} };
 static CChannel m_aChannels[NUM_CHANNELS] = { {255, 0} };
 
 static LOCK m_SoundLock = 0;
-static int m_SoundEnabled = 0;
 
 static int m_CenterX = 0;
 static int m_CenterY = 0;
@@ -198,6 +197,7 @@ static void SdlCallback(void *pUnused, Uint8 *pStream, int Len)
 
 int CSound::Init()
 {
+	m_SoundEnabled = 0;
 	m_pGraphics = Kernel()->RequestInterface<IEngineGraphics>();
 	m_pStorage = Kernel()->RequestInterface<IStorage>();
 	
diff --git a/src/engine/client/sound.h b/src/engine/client/sound.h
index 3cc84d4d..8112427c 100644
--- a/src/engine/client/sound.h
+++ b/src/engine/client/sound.h
@@ -7,6 +7,8 @@
 
 class CSound : public IEngineSound
 {
+	int m_SoundEnabled;
+
 public:
 	IEngineGraphics *m_pGraphics;
 	IStorage *m_pStorage;
@@ -23,6 +25,8 @@ public:
 	static IOHANDLE ms_File;
 	static int ReadData(void *pBuffer, int Size);
 
+	virtual bool IsSoundEnabled() { return m_SoundEnabled != 0; }
+
 	virtual int LoadWV(const char *pFilename);
 
 	virtual void SetListenerPos(float x, float y);