else
return new wxSound(fileName);
}
- %name(SoundFromData) wxSound(PyObject* data) {
+ %RenameCtor(SoundFromData, wxSound(PyObject* data))
+ {
unsigned char* buffer; int size;
wxSound *sound = NULL;
%#ifndef __WXMAC__
unsigned char* buffer;
int size;
- bool rv = False;
+ bool rv = false;
bool blocked = wxPyBeginBlockThreads();
if (!PyArg_Parse(data, "t#", &buffer, &size))
PyErr_SetString(PyExc_NotImplementedError,
"Create from data is not available on this platform.");
wxPyEndBlockThreads(blocked);
- return False;
+ return false;
%#endif
}
}
bool Play(unsigned flags = wxSOUND_ASYNC) const;
// Plays sound from filename:
- %name(PlaySound) static bool Play(const wxString& filename, unsigned flags = wxSOUND_ASYNC);
+ %Rename(PlaySound, static bool, Play(const wxString& filename, unsigned flags = wxSOUND_ASYNC));
-#ifndef __WXMAC__
static void Stop();
-#else
- %extend {
- static void Stop()
- { wxPyRaiseNotImplemented(); }
- }
-#endif
%pythoncode { def __nonzero__(self): return self.IsOk() }
};