+void wxSoundBackendSDL::FinishedPlayback()
+{
+    if (!m_playing)
+        Stop();
+}
+
+bool wxSoundBackendSDL::OpenAudio()
+{
+    if (!m_audioOpen)
+    {
+        if (!m_evtHandler)
+            m_evtHandler = new wxSoundBackendSDLEvtHandler(this);
+
+        m_spec.silence = 0;
+        m_spec.samples = 4096;
+        m_spec.size = 0;
+        m_spec.callback = wx_sdl_audio_callback;
+        m_spec.userdata = (void*)this;
+
+        wxLogTrace(wxT("sound"), wxT("opening SDL audio..."));
+        if (SDL_OpenAudio(&m_spec, NULL) >= 0)
+        {
+#if wxUSE_LOG_DEBUG
+            char driver[256];
+#if SDL_MAJOR_VERSION == 1
+            SDL_AudioDriverName(driver, 256);
+#elif SDL_MAJOR_VERSION > 1            
+            strncpy(driver, SDL_GetCurrentAudioDriver(), 256);
+#endif
+            wxLogTrace(wxT("sound"), wxT("opened audio, driver '%s'"),
+                       wxString(driver, wxConvLocal).c_str());
+#endif
+            m_audioOpen = true;
+            return true;
+        }
+        else
+        {
+            wxString err(SDL_GetError(), wxConvLocal);
+            wxLogError(_("Couldn't open audio: %s"), err.c_str());
+            return false;
+        }
+    }
+    return true;
+}
+
+void wxSoundBackendSDL::CloseAudio()
+{
+    if (m_audioOpen)
+    {
+        SDL_CloseAudio();
+        wxLogTrace(wxT("sound"), wxT("closed audio"));
+        m_audioOpen = false;
+    }
+}
+
+bool wxSoundBackendSDL::Play(wxSoundData *data, unsigned flags,
+                             volatile wxSoundPlaybackStatus *WXUNUSED(status))