X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e8482f24cfc00645607f8526fde38d39e0dcaa63..65d48d095fb1390edd46f682c864320d7b9626e3:/contrib/src/mmedia/sndwin.cpp diff --git a/contrib/src/mmedia/sndwin.cpp b/contrib/src/mmedia/sndwin.cpp index c2776d9438..538f7e1813 100644 --- a/contrib/src/mmedia/sndwin.cpp +++ b/contrib/src/mmedia/sndwin.cpp @@ -16,11 +16,12 @@ #ifndef WX_PRECOMP #include "wx/defs.h" #include "wx/app.h" - #include "wx/module.h" - #include "wx/msw/private.h" #include "wx/string.h" #endif +#include "wx/module.h" +#include "wx/msw/private.h" + // ------------------------------------------------------------------------- // MMedia headers // ------------------------------------------------------------------------- @@ -97,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(); } @@ -117,7 +121,13 @@ wxSoundStreamWin::~wxSoundStreamWin() // ----------------------------------------------------------------------- // _wxSoundHandlerWndProc: Window callback to handle buffer completion // ----------------------------------------------------------------------- -LRESULT APIENTRY _EXPORT _wxSoundHandlerWndProc(HWND hWnd, UINT message, +/* +LRESULT APIENTRY _EXPORT +*/ + +LRESULT WXDLLEXPORT APIENTRY _EXPORT + + _wxSoundHandlerWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { wxSoundStreamWin *sndwin; @@ -307,7 +317,7 @@ wxSoundInfoHeader *wxSoundStreamWin::AllocHeader(int mode) info->m_h_header = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, sizeof(WAVEHDR)); if (!info->m_h_data || !info->m_h_header) { delete info; - m_snderror = wxSOUND_MEMERR; + m_snderror = wxSOUND_MEMERROR; return NULL; }