]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/mmedia/sndwin.cpp
Compile fix for sound without threads. Not sure
[wxWidgets.git] / contrib / src / mmedia / sndwin.cpp
index 467b53db9e3ad1c9e34bf1eeefbc0b2f1f5507d7..ea2cbe2b697b5fe6fe9fc97f3b39b495a731c2ea 100644 (file)
@@ -53,7 +53,7 @@ static inline wxSoundStreamWin *wxFindSoundFromHandle(WXHWND hWnd)
   wxNode *node = wxSoundHandleList->Find((long)hWnd);
   if (!node)
     return NULL;
   wxNode *node = wxSoundHandleList->Find((long)hWnd);
   if (!node)
     return NULL;
-  return (wxSoundStreamWin *)node->Data();
+  return (wxSoundStreamWin *)node->GetData();
 }
 
 struct _wxSoundInternal {
 }
 
 struct _wxSoundInternal {
@@ -124,7 +124,7 @@ wxSoundStreamWin::~wxSoundStreamWin()
 LRESULT APIENTRY _EXPORT 
 
  _wxSoundHandlerWndProc(HWND hWnd, UINT message,
 LRESULT APIENTRY _EXPORT 
 
  _wxSoundHandlerWndProc(HWND hWnd, UINT message,
-                 WPARAM wParam, LPARAM lParam)
+                 WPARAM wParam, LPARAM WXUNUSED(lParam))
 {
   wxSoundStreamWin *sndwin;
 
 {
   wxSoundStreamWin *sndwin;
 
@@ -154,15 +154,13 @@ void wxSoundStreamWin::CreateSndWindow()
 {
   FARPROC proc = MakeProcInstance((FARPROC)_wxSoundHandlerWndProc,
                                   wxGetInstance());
 {
   FARPROC proc = MakeProcInstance((FARPROC)_wxSoundHandlerWndProc,
                                   wxGetInstance());
-  int error;
-
   // 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);
 
   // 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);
 
 
   ::SetWindowLong(m_internal->m_sndWin, GWL_WNDPROC, (LONG)proc);
 
@@ -661,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.
 // -------------------------------------------------------------------------
 // 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;
     
 {
     wxSoundInfoHeader *info;
     
@@ -695,7 +693,7 @@ void wxSoundStreamWin::NotifyDoneBuffer(wxUint32 dev_handle, int flag)
 // -------------------------------------------------------------------------
 // SetSoundFormat()
 // -------------------------------------------------------------------------
 // -------------------------------------------------------------------------
 // SetSoundFormat()
 // -------------------------------------------------------------------------
-bool wxSoundStreamWin::SetSoundFormat(wxSoundFormatBase& base)
+bool wxSoundStreamWin::SetSoundFormat(const wxSoundFormatBase& base)
 {
   // TODO: detect best format
   return wxSoundStream::SetSoundFormat(base);
 {
   // TODO: detect best format
   return wxSoundStream::SetSoundFormat(base);