]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/sound.h
Use wxGetTranslation() instead of _() in the public headers.
[wxWidgets.git] / include / wx / os2 / sound.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/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 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_SOUND_H_
13 #define _WX_SOUND_H_
14
15 #include "wx/object.h"
16
17 class wxSound : public wxSoundBase
18 {
19 public:
20 wxSound();
21 wxSound(const wxString& fileName, bool isResource = FALSE);
22 wxSound(size_t size, const void* data);
23 virtual ~wxSound();
24
25 public:
26 // Create from resource or file
27 bool Create(const wxString& fileName, bool isResource = FALSE);
28 // Create from data
29 bool Create(size_t size, const void* data);
30
31 bool IsOk() const { return (m_waveData ? TRUE : FALSE); }
32
33 protected:
34 bool Free();
35
36 bool DoPlay(unsigned flags) const;
37
38 private:
39 wxByte* m_waveData;
40 int m_waveLength;
41 bool m_isResource;
42 };
43
44 #endif
45 // _WX_SOUND_H_