1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface stuff for wxSound
7 // Created: 18-June-1999
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
23 //---------------------------------------------------------------------------
36 // A C++ stub class for wxWave for platforms that don't have it.
37 class wxSound : public wxObject
41 wxPyBeginBlockThreads();
42 PyErr_SetString(PyExc_NotImplementedError,
43 "wxSound is not available on this platform.");
44 wxPyEndBlockThreads();
46 wxSound(const wxString&, bool) {
47 wxPyBeginBlockThreads();
48 PyErr_SetString(PyExc_NotImplementedError,
49 "wxSound is not available on this platform.");
50 wxPyEndBlockThreads();
52 wxSound(int, const wxByte*) {
53 wxPyBeginBlockThreads();
54 PyErr_SetString(PyExc_NotImplementedError,
55 "wxSound is not available on this platform.");
56 wxPyEndBlockThreads();
61 bool Create(const wxString&, bool) { return false; }
62 bool Create(int, const wxByte*) { return false; };
63 bool IsOk() { return false; };
64 bool Play(unsigned) const { return false; }
65 static bool Play(const wxString&, unsigned) { return false; }
74 class wxSound /*: public wxObject*/
79 wxSound(const wxString& fileName, bool isResource = false);
80 wxSound(int size, const wxByte* data);
86 // Create from resource or file
87 bool Create(const wxString& fileName, bool isResource = false);
91 bool Create(int size, const wxByte* data);
94 bool Create(int size, const wxByte* data) {
95 wxPyBeginBlockThreads();
96 PyErr_SetString(PyExc_NotImplementedError,
97 "Create from data is not available on this platform.");
98 wxPyEndBlockThreads();
107 bool Play(unsigned flags = wxSOUND_ASYNC) const;
109 // Plays sound from filename:
110 %name(PlaySound)static bool Play(const wxString& filename, unsigned flags = wxSOUND_ASYNC);
117 { wxPyRaiseNotImplemented(); }
121 %pythoncode { def __nonzero__(self): return self.IsOk() }
127 //---------------------------------------------------------------------------