]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/sound_sdl.cpp
Fix for probably rare but potential refcount leak.
[wxWidgets.git] / src / unix / sound_sdl.cpp
index 1ecc0212e140433075fedb3d392bd5dc80fa4f2d..12edf71953ac54c616977e63087865122ae84fce 100644 (file)
@@ -56,8 +56,7 @@ END_DECLARE_EVENT_TYPES()
     DECLARE_EVENT_TABLE_ENTRY(wxEVT_SOUND_BACKEND_SDL_NOTIFICATION, \
                               -1,                       \
                               -1,                       \
-                              (wxObjectEventFunction)   \
-                              (wxSoundBackendSDLNotificationFunction)& func, \
+                              (wxObjectEventFunction)  wxStaticCastEvent( wxSoundBackendSDLNotificationFunction, & func ), \
                               (wxObject *) NULL ),
 
 IMPLEMENT_DYNAMIC_CLASS(wxSoundBackendSDLNotification, wxEvtHandler)
@@ -305,7 +304,7 @@ bool wxSoundBackendSDL::Play(wxSoundData *data, unsigned flags,
             if (wxThread::IsMain())
                 wxMutexGuiLeave();
 #endif
-            wxUsleep(10);
+            wxMilliSleep(10);
 #if wxUSE_THREADS
             if (wxThread::IsMain())
                 wxMutexGuiEnter();