#include <windowsx.h>
-#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
- #include "wx/msw/gnuwin32/extra.h"
-#else
- #include <mmsystem.h>
-#endif
+#include <mmsystem.h>
wxSound::wxSound()
: m_waveData(NULL), m_waveLength(0), m_isResource(false)
if (isResource)
{
- m_isResource = TRUE;
+ m_isResource = true;
HRSRC hresInfo;
hresInfo = ::FindResource((HMODULE) wxhInstance, fileName, wxT("WAVE"));
bool wxSound::Free()
{
- if (m_waveData)
- {
+ if (m_waveData)
+ {
#ifdef __WXWINCE__
- HGLOBAL waveData = (HGLOBAL) m_waveData;
+ HGLOBAL waveData = (HGLOBAL) m_waveData;
#else
- HGLOBAL waveData = GlobalHandle(m_waveData);
+ HGLOBAL waveData = GlobalHandle(m_waveData);
#endif
- if (waveData)
- {
+ if (waveData)
+ {
#ifndef __WXWINCE__
- if (m_isResource)
- ::FreeResource(waveData);
- else
+ if (m_isResource)
+ ::FreeResource(waveData);
+ else
#endif
- {
- GlobalUnlock(waveData);
- GlobalFree(waveData);
- }
-
- m_waveData = NULL;
- m_waveLength = 0;
- return true;
+ {
+ GlobalUnlock(waveData);
+ GlobalFree(waveData);
+ }
+
+ m_waveData = NULL;
+ m_waveLength = 0;
+ return true;
+ }
}
- }
- return false;
+ return false;
}
/*static*/ void wxSound::Stop()