blob: 163068d1b6d4ca057475b8458d96a45d1b19533e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
//-----------------------------------------------------------------
// Wave Object
// C++ Header - Wave.h
//-----------------------------------------------------------------
#ifndef __WAVE_H__
#define __WAVE_H__
//-----------------------------------------------------------------
// Inclusions
//-----------------------------------------------------------------
#include "../common.h"
#include <MMSystem.h>
//-----------------------------------------------------------------
// CWave Class - Wave Object
//-----------------------------------------------------------------
class AFX_CLASS_EXPORT CWave : public CObject {
// Public Constructor(s)/Destructor
public:
CWave();
CWave(const CString &str);
CWave(UINT uiResID, HMODULE hmod);
virtual ~CWave();
// Public Methods
public:
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
|