From e8e4a2a4d4ef3347d296ad2ddf576fc3677f4cea Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 5 Feb 2004 01:04:08 +0000 Subject: [PATCH] Some ifdef's to correct compile problems on wxMac git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_sound.i | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/wxPython/src/_sound.i b/wxPython/src/_sound.i index b26dbd859c..c91c6a91eb 100644 --- a/wxPython/src/_sound.i +++ b/wxPython/src/_sound.i @@ -85,10 +85,21 @@ 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(); + } + } +#endif + bool IsOk(); // Play the sound: @@ -97,8 +108,13 @@ 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() {} + } +#endif %pythoncode { def __nonzero__(self): return self.IsOk() } };