]>
Commit | Line | Data |
---|---|---|
ffecfa5a | 1 | ///////////////////////////////////////////////////////////////////////////// |
e1d63b79 | 2 | // Name: wx/palmos/sound.h |
ffecfa5a | 3 | // Purpose: wxSound class |
e1d63b79 | 4 | // Author: William Osborne - minimal working wxPalmOS port |
ffecfa5a JS |
5 | // Modified by: |
6 | // Created: 10/13/04 | |
e1d63b79 | 7 | // RCS-ID: $Id$ |
ffecfa5a JS |
8 | // Copyright: (c) William Osborne |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_SOUND_H_ | |
13 | #define _WX_SOUND_H_ | |
14 | ||
ffecfa5a JS |
15 | #if wxUSE_SOUND |
16 | ||
17 | #include "wx/object.h" | |
18 | ||
19 | class WXDLLIMPEXP_ADV wxSound : public wxSoundBase | |
20 | { | |
21 | public: | |
22 | wxSound(); | |
23 | wxSound(const wxString& fileName, bool isResource = false); | |
24 | wxSound(int size, const wxByte* data); | |
d3c7fc99 | 25 | virtual ~wxSound(); |
ffecfa5a JS |
26 | |
27 | public: | |
28 | // Create from resource or file | |
29 | bool Create(const wxString& fileName, bool isResource = false); | |
30 | // Create from data | |
31 | bool Create(int size, const wxByte* data); | |
32 | ||
33 | bool IsOk() const { return (m_waveData ? true : false); }; | |
e1d63b79 | 34 | |
ffecfa5a JS |
35 | static void Stop(); |
36 | ||
37 | protected: | |
38 | bool Free(); | |
e1d63b79 | 39 | |
ffecfa5a JS |
40 | bool DoPlay(unsigned flags) const; |
41 | ||
42 | private: | |
43 | wxByte* m_waveData; | |
44 | int m_waveLength; | |
45 | bool m_isResource; | |
46 | ||
c0c133e1 | 47 | wxDECLARE_NO_COPY_CLASS(wxSound); |
ffecfa5a JS |
48 | }; |
49 | #endif | |
50 | #endif | |
51 |