]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/sound.h
moving XRC to the core
[wxWidgets.git] / include / wx / os2 / sound.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: sound.h
3 // Purpose: wxSound class (loads and plays short Windows .wav files).
4 // Optional on non-Windows platforms.
5 // Author: David Webster
6 // Modified by:
7 // Created: 10/17/99
8 // RCS-ID: $Id$
9 // Copyright: (c) David Webster
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
12
13 #ifndef _WX_SOUND_H_
14 #define _WX_SOUND_H_
15
16 #include "wx/object.h"
17
18 class wxSound : public wxSoundBase
19 {
20 public:
21 wxSound();
22 wxSound(const wxString& fileName, bool isResource = FALSE);
23 wxSound(int size, const wxByte* data);
24 ~wxSound();
25
26 public:
27 // Create from resource or file
28 bool Create(const wxString& fileName, bool isResource = FALSE);
29 // Create from data
30 bool Create(int size, const wxByte* data);
31
32 bool IsOk() const { return (m_waveData ? TRUE : FALSE); };
33
34 protected:
35 bool Free();
36
37 bool DoPlay(unsigned flags) const;
38
39 private:
40 wxByte* m_waveData;
41 int m_waveLength;
42 bool m_isResource;
43 };
44
45 #endif
46 // _WX_SOUND_H_