]> git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/sound.h
applied heavily modified patch 1116702: support for specifying disabled toolbar image...
[wxWidgets.git] / include / wx / palmos / sound.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/sound.h
3 // Purpose: wxSound class
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by:
6 // Created: 10/13/04
7 // RCS-ID: $Id$
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_SOUND_H_
13 #define _WX_SOUND_H_
14
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "sound.h"
17 #endif
18
19 #if wxUSE_SOUND
20
21 #include "wx/object.h"
22
23 class WXDLLIMPEXP_ADV wxSound : public wxSoundBase
24 {
25 public:
26 wxSound();
27 wxSound(const wxString& fileName, bool isResource = false);
28 wxSound(int size, const wxByte* data);
29 ~wxSound();
30
31 public:
32 // Create from resource or file
33 bool Create(const wxString& fileName, bool isResource = false);
34 // Create from data
35 bool Create(int size, const wxByte* data);
36
37 bool IsOk() const { return (m_waveData ? true : false); };
38
39 static void Stop();
40
41 protected:
42 bool Free();
43
44 bool DoPlay(unsigned flags) const;
45
46 private:
47 wxByte* m_waveData;
48 int m_waveLength;
49 bool m_isResource;
50
51 DECLARE_NO_COPY_CLASS(wxSound)
52 };
53 #endif
54 #endif
55