X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/315ebf688c0e69bed47cd3149158198b781b5f65..f60b1d829dd8a6d5e47a2adcd3690acb3bd10150:/src/msw/sound.cpp diff --git a/src/msw/sound.cpp b/src/msw/sound.cpp index 795b1a9cbe..9f430540c2 100644 --- a/src/msw/sound.cpp +++ b/src/msw/sound.cpp @@ -32,11 +32,7 @@ #include -#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__) - #include "wx/msw/gnuwin32/extra.h" -#else - #include -#endif +#include wxSound::wxSound() : m_waveData(NULL), m_waveLength(0), m_isResource(false) @@ -66,7 +62,7 @@ bool wxSound::Create(const wxString& fileName, bool isResource) if (isResource) { - m_isResource = TRUE; + m_isResource = true; HRSRC hresInfo; hresInfo = ::FindResource((HMODULE) wxhInstance, fileName, wxT("WAVE")); @@ -130,32 +126,32 @@ bool wxSound::DoPlay(unsigned flags) const 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()