summaryrefslogtreecommitdiff
path: root/src/T2DLL/Wave.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/T2DLL/Wave.h')
-rw-r--r--src/T2DLL/Wave.h57
1 files changed, 42 insertions, 15 deletions
diff --git a/src/T2DLL/Wave.h b/src/T2DLL/Wave.h
index 18ae45e..4febc3b 100644
--- a/src/T2DLL/Wave.h
+++ b/src/T2DLL/Wave.h
@@ -1,21 +1,48 @@
-#pragma once
+//-----------------------------------------------------------------
+// Wave Object
+// C++ Header - Wave.h
+//-----------------------------------------------------------------
+
+#ifndef __WAVE_H__
+#define __WAVE_H__
+
+//-----------------------------------------------------------------
+// Inclusions
+//-----------------------------------------------------------------
#include "common.h"
+#include <MMSystem.h>
-class CWave {
+//-----------------------------------------------------------------
+// CWave Class - Wave Object
+//-----------------------------------------------------------------
+class AFX_EXT_CLASS CWave : public CObject {
+ // Public Constructor(s)/Destructor
public:
- CWave();
- CWave(const CString&);
- CWave(unsigned int, HINSTANCE);
- virtual ~CWave();
- int Create(const CString&);
- int Create(unsigned int, HINSTANCE);
- int Play(int, int) const;
- int GetFormat(WAVEFORMATEX&) const;
- unsigned long GetDataLen() const;
- unsigned long GetData(unsigned char*&, unsigned long) const;
-protected:
- int Free();
+ CWave();
+ CWave(const CString &str);
+ CWave(UINT uiResID, HMODULE hmod);
+ virtual ~CWave();
+ // Public Methods
public:
- int IsValid() const {}
+ BOOL Create(const CString &str);
+ BOOL Create(UINT uiResID, HMODULE hmod);
+ BOOL IsValid() const { return (m_pImageData ? TRUE :
+ FALSE); };
+ BOOL Play(BOOL bAsync = TRUE, BOOL bLooped = FALSE) const;
+ BOOL GetFormat(WAVEFORMATEX& wfFormat) const;
+ DWORD GetDataLen() const;
+ DWORD GetData(BYTE*& pWaveData, DWORD dwMaxToCopy) const;
+
+ // Protected Methods
+protected:
+ BOOL Free();
+
+ // Private Data
+private:
+ BYTE* m_pImageData;
+ DWORD m_dwImageLen;
+ BOOL m_bResource;
};
+
+#endif