about summary refs log tree commit diff
path: root/src/engine/client/sound.h
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2010-05-29 07:25:38 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2010-05-29 07:25:38 +0000
commit72c06a258940696093f255fb1061beb58e1cdd0b (patch)
tree36b9a7712eec2d4f07837eab9c38ef1c5af85319 /src/engine/client/sound.h
parente56feb597bc743677633432f77513b02907fd169 (diff)
downloadzcatch-72c06a258940696093f255fb1061beb58e1cdd0b.tar.gz
zcatch-72c06a258940696093f255fb1061beb58e1cdd0b.zip
copied refactor to trunk
Diffstat (limited to 'src/engine/client/sound.h')
-rw-r--r--src/engine/client/sound.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/engine/client/sound.h b/src/engine/client/sound.h
new file mode 100644
index 00000000..9c94c6ad
--- /dev/null
+++ b/src/engine/client/sound.h
@@ -0,0 +1,39 @@
+#ifndef ENGINE_CLIENT_SOUND_H
+#define ENGINE_CLIENT_SOUND_H
+
+#include <engine/sound.h>
+#include <engine/storage.h>
+#include <engine/graphics.h>
+#include <engine/shared/engine.h>
+
+class CSound : public IEngineSound
+{
+public:
+	IEngineGraphics *m_pGraphics;
+	IStorage *m_pStorage;
+
+	virtual int Init();
+
+	int Update();
+	int Shutdown();
+	int AllocId();
+
+	static void RateConvert(int SampleId);
+
+	// TODO: Refactor: clean this mess up
+	static IOHANDLE ms_File;
+	static int ReadData(void *pBuffer, int Size);
+
+	virtual int LoadWV(const char *pFilename);
+
+	virtual void SetListenerPos(float x, float y);
+	virtual void SetChannel(int ChannelId, float Vol, float Pan);
+
+	int Play(int ChannelId, int SampleId, int Flags, float x, float y);
+	virtual int PlayAt(int ChannelId, int SampleId, int Flags, float x, float y);
+	virtual int Play(int ChannelId, int SampleId, int Flags);
+	virtual void Stop(int VoiceId);
+	virtual void StopAll();
+};
+
+#endif