]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/wave.h
finished wxWindow for MGL
[wxWidgets.git] / include / wx / os2 / wave.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wave.h
3 // Purpose: wxWave 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_WAVE_H_
14 #define _WX_WAVE_H_
15
16 #include "wx/object.h"
17
18 class wxWave : public wxObject
19 {
20 public:
21 wxWave();
22 wxWave(const wxString& fileName, bool isResource = FALSE);
23 wxWave(int size, const wxByte* data);
24 ~wxWave();
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 bool Play(bool async = TRUE, bool looped = FALSE) const;
34
35 protected:
36 bool Free();
37
38 private:
39 wxByte* m_waveData;
40 int m_waveLength;
41 bool m_isResource;
42 };
43
44 #endif
45 // _WX_WAVE_H_