X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8c6f3b9c6d214686e0496b318fd35f8fc007a1e8..1dce6f094ab0d67e576e1b172f8c60fe7f48287c:/contrib/src/mmedia/sndwin.cpp diff --git a/contrib/src/mmedia/sndwin.cpp b/contrib/src/mmedia/sndwin.cpp index 538f7e1813..7e0795e895 100644 --- a/contrib/src/mmedia/sndwin.cpp +++ b/contrib/src/mmedia/sndwin.cpp @@ -121,14 +121,10 @@ wxSoundStreamWin::~wxSoundStreamWin() // ----------------------------------------------------------------------- // _wxSoundHandlerWndProc: Window callback to handle buffer completion // ----------------------------------------------------------------------- -/* -LRESULT APIENTRY _EXPORT -*/ - -LRESULT WXDLLEXPORT APIENTRY _EXPORT +LRESULT APIENTRY _EXPORT _wxSoundHandlerWndProc(HWND hWnd, UINT message, - WPARAM wParam, LPARAM lParam) + WPARAM wParam, LPARAM WXUNUSED(lParam)) { wxSoundStreamWin *sndwin; @@ -158,13 +154,13 @@ void wxSoundStreamWin::CreateSndWindow() { FARPROC proc = MakeProcInstance((FARPROC)_wxSoundHandlerWndProc, wxGetInstance()); - int error; - - m_internal->m_sndWin = ::CreateWindow(wxCanvasClassName, NULL, 0, + // NB: class name must be kept in sync with wxCanvasClassName in + // src/msw/app.cpp! + m_internal->m_sndWin = ::CreateWindow(wxT("wxWindowClass"), NULL, 0, 0, 0, 0, 0, NULL, (HMENU) NULL, wxGetInstance(), NULL); - error = GetLastError(); + GetLastError(); ::SetWindowLong(m_internal->m_sndWin, GWL_WNDPROC, (LONG)proc); @@ -663,7 +659,7 @@ wxSoundStream& wxSoundStreamWin::Read(void *buffer, wxUint32 len) // fragment finished. It reinitializes the parameters of the fragment and // sends an event to the clients. // ------------------------------------------------------------------------- -void wxSoundStreamWin::NotifyDoneBuffer(wxUint32 dev_handle, int flag) +void wxSoundStreamWin::NotifyDoneBuffer(wxUint32 WXUNUSED(dev_handle), int flag) { wxSoundInfoHeader *info; @@ -697,7 +693,7 @@ void wxSoundStreamWin::NotifyDoneBuffer(wxUint32 dev_handle, int flag) // ------------------------------------------------------------------------- // SetSoundFormat() // ------------------------------------------------------------------------- -bool wxSoundStreamWin::SetSoundFormat(wxSoundFormatBase& base) +bool wxSoundStreamWin::SetSoundFormat(const wxSoundFormatBase& base) { // TODO: detect best format return wxSoundStream::SetSoundFormat(base); @@ -764,7 +760,7 @@ bool wxSoundStreamWin::QueueFilled() const // wxSoundWinModule // -------------------------------------------------------------------------- -class WXDLLEXPORT wxSoundWinModule : public wxModule { +class wxSoundWinModule : public wxModule { DECLARE_DYNAMIC_CLASS(wxSoundWinModule) public: bool OnInit();