X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78862f240c167007c922e5fc6105e4d9522f332f..8da2ab99009877d864c19b1ad90a9c0d02c61e2e:/wxPython/src/_sound.i?ds=sidebyside diff --git a/wxPython/src/_sound.i b/wxPython/src/_sound.i index b26dbd859c..8e938e3824 100644 --- a/wxPython/src/_sound.i +++ b/wxPython/src/_sound.i @@ -85,10 +85,22 @@ public: // Create from resource or file bool Create(const wxString& fileName, bool isResource = false); - + +#ifndef __WXMAC__ // Create from data bool Create(int size, const wxByte* data); - +#else + %extend { + bool Create(int size, const wxByte* data) { + wxPyBeginBlockThreads(); + PyErr_SetString(PyExc_NotImplementedError, + "Create from data is not available on this platform."); + wxPyEndBlockThreads(); + return False; + } + } +#endif + bool IsOk(); // Play the sound: @@ -97,8 +109,14 @@ public: // Plays sound from filename: %name(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() } };