]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/wave.h
added wxprec.h
[wxWidgets.git] / include / wx / mac / 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: Stefan Csomor
6 // Modified by:
7 // Created: 1998-01-01
8 // RCS-ID: $Id$
9 // Copyright: (c) Stefan Csomor
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
12
13 #ifndef _WX_WAVE_H_
14 #define _WX_WAVE_H_
15
16 #if defined(__GNUG__) && !defined(__APPLE__)
17 #pragma interface "wave.h"
18 #endif
19
20 #if wxUSE_WAVE
21
22 #include "wx/object.h"
23
24 class WXDLLEXPORT wxWave : public wxObject
25 {
26 public:
27 wxWave();
28 wxWave(const wxString& fileName, bool isResource = FALSE);
29 wxWave(int size, const wxByte* data);
30 ~wxWave();
31
32 public:
33 bool Create(const wxString& fileName, bool isResource = FALSE);
34 bool IsOk() const { return !m_sndname.IsEmpty(); }
35 bool Play(bool async = TRUE, bool looped = FALSE) const;
36
37 protected:
38 // prevent collision with some BSD definitions of macro Free()
39 bool FreeData();
40
41 private:
42 void* m_sndChan;
43
44 wxString m_sndname;
45 void* m_hSnd;
46 int m_waveLength;
47 bool m_isResource;
48 };
49
50 #endif
51 #endif
52 // _WX_WAVE_H_