]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/mmedia/sndwin.cpp
added bakefile to build all demos
[wxWidgets.git] / contrib / src / mmedia / sndwin.cpp
index 185f1bfb5eef7c49645ac74d37d275299727ea4b..467b53db9e3ad1c9e34bf1eeefbc0b2f1f5507d7 100644 (file)
@@ -98,8 +98,11 @@ wxSoundStreamWin::wxSoundStreamWin()
 
   m_waiting_for = FALSE;
 
-  if (!OpenDevice(wxSOUND_OUTPUT))
-    return;
+  if (!OpenDevice(wxSOUND_OUTPUT)) {
+    m_snderror = wxSOUND_NOERROR; //next call to OpenDevice won't do this
+    if (!OpenDevice(wxSOUND_INPUT))
+      return;
+  }
 
   CloseDevice();
 }
@@ -118,11 +121,7 @@ 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)
@@ -157,7 +156,9 @@ void wxSoundStreamWin::CreateSndWindow()
                                   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);
 
@@ -761,7 +762,7 @@ bool wxSoundStreamWin::QueueFilled() const
 // wxSoundWinModule
 // --------------------------------------------------------------------------
 
-class WXDLLEXPORT wxSoundWinModule : public wxModule {
+class wxSoundWinModule : public wxModule {
    DECLARE_DYNAMIC_CLASS(wxSoundWinModule)
  public:
    bool OnInit();