]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/sound.h
The rounded corners look really dumb at this size.
[wxWidgets.git] / include / wx / msw / sound.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/sound.h
3 // Purpose: wxSound class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_SOUND_H_
12 #define _WX_SOUND_H_
13
14 #if wxUSE_SOUND
15
16 class WXDLLIMPEXP_ADV wxSound : public wxSoundBase
17 {
18 public:
19 wxSound();
20 wxSound(const wxString& fileName, bool isResource = false);
21 wxSound(size_t size, const void* data);
22 virtual ~wxSound();
23
24 // Create from resource or file
25 bool Create(const wxString& fileName, bool isResource = false);
26
27 // Create from data
28 bool Create(size_t size, const void* data);
29
30 bool IsOk() const { return m_data != NULL; }
31
32 static void Stop();
33
34 protected:
35 void Init() { m_data = NULL; }
36 bool CheckCreatedOk();
37 void Free();
38
39 virtual bool DoPlay(unsigned flags) const;
40
41 private:
42 // data of this object
43 class wxSoundData *m_data;
44
45 wxDECLARE_NO_COPY_CLASS(wxSound);
46 };
47
48 #endif // wxUSE_SOUND
49
50 #endif // _WX_SOUND_H_
51