]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/classic/sound.h
workaround for BCC bug - use #defines instead of enums
[wxWidgets.git] / include / wx / mac / classic / 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: 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_SOUND_H_
14 #define _WX_SOUND_H_
15
16 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
17 #pragma interface "sound.h"
18 #endif
19
20 #if wxUSE_SOUND
21
22 #include "wx/object.h"
23
24 class WXDLLEXPORT wxSound : public wxSoundBase
25 {
26 public:
27 wxSound();
28 wxSound(const wxString& fileName, bool isResource = FALSE);
29 wxSound(int size, const wxByte* data);
30 ~wxSound();
31
32 public:
33 bool Create(const wxString& fileName, bool isResource = FALSE);
34 bool IsOk() const { return !m_sndname.IsEmpty(); }
35
36 protected:
37 // prevent collision with some BSD definitions of macro Free()
38 bool FreeData();
39
40 bool DoPlay(unsigned flags) const;
41
42 private:
43 void* m_sndChan;
44
45 wxString m_sndname;
46 void* m_hSnd;
47 int m_waveLength;
48 bool m_isResource;
49 };
50
51 #endif
52 #endif
53 // _WX_SOUND_H_