]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wave.h | |
3 | // Purpose: wxWave class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_WAVE_H_ | |
13 | #define _WX_WAVE_H_ | |
14 | ||
15 | #ifdef __GNUG__ | |
16 | #pragma interface "wave.h" | |
17 | #endif | |
18 | ||
19 | #include "wx/object.h" | |
20 | ||
21 | class wxWave : public wxObject | |
22 | { | |
23 | public: | |
24 | wxWave(); | |
25 | wxWave(const wxString& fileName, bool isResource = FALSE); | |
26 | wxWave(int size, const byte* data); | |
27 | ~wxWave(); | |
28 | ||
29 | public: | |
30 | // Create from resource or file | |
31 | bool Create(const wxString& fileName, bool isResource = FALSE); | |
32 | // Create from data | |
33 | bool Create(int size, const byte* data); | |
34 | ||
35 | bool IsOk() const { return (m_waveData ? TRUE : FALSE); }; | |
36 | bool Play(bool async = TRUE, bool looped = FALSE) const; | |
37 | ||
38 | protected: | |
39 | bool Free(); | |
40 | ||
41 | private: | |
42 | byte* m_waveData; | |
43 | int m_waveLength; | |
44 | bool m_isResource; | |
45 | }; | |
46 | ||
47 | #endif | |
48 |