projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wxITEM_FOO instead of wxItem_Foo, for the sake of consistency
[wxWidgets.git]
/
src
/
msw
/
wave.cpp
diff --git
a/src/msw/wave.cpp
b/src/msw/wave.cpp
index 805a64fa0ea5455566b1111656896f4007b6a754..52e5ebfe56b7664dff3b1d35e1981cac6202b566 100644
(file)
--- a/
src/msw/wave.cpp
+++ b/
src/msw/wave.cpp
@@
-6,7
+6,7
@@
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
-// Licence: wxWindows license
+// Licence:
wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
@@
-20,6
+20,8
@@
#pragma hdrstop
#endif
#pragma hdrstop
#endif
+#if wxUSE_WAVE
+
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
@@
-31,14
+33,10
@@
#include <windows.h>
#include <windowsx.h>
#include <windows.h>
#include <windowsx.h>
-#ifndef __GNUWIN32__
-#include <mmsystem.h>
-#endif
-
-#ifndef __TWIN32__
-#ifdef __GNUWIN32__
-#include "wx/msw/gnuwin32/extra.h"
-#endif
+#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
+ #include "wx/msw/gnuwin32/extra.h"
+#else
+ #include <mmsystem.h>
#endif
wxWave::wxWave()
#endif
wxWave::wxWave()
@@
-73,9
+71,13
@@
bool wxWave::Create(const wxString& fileName, bool isResource)
HRSRC hresInfo;
#if defined(__WIN32__) && !defined(__TWIN32__)
HRSRC hresInfo;
#if defined(__WIN32__) && !defined(__TWIN32__)
- hresInfo = ::FindResourceA((HMODULE) wxhInstance, fileName, "WAVE");
+#ifdef _UNICODE
+ hresInfo = ::FindResourceW((HMODULE) wxhInstance, fileName, wxT("WAVE"));
+#else
+ hresInfo = ::FindResourceA((HMODULE) wxhInstance, fileName, wxT("WAVE"));
+#endif
#else
#else
- hresInfo = ::FindResource((HMODULE) wxhInstance, fileName,
"WAVE"
);
+ hresInfo = ::FindResource((HMODULE) wxhInstance, fileName,
wxT("WAVE")
);
#endif
if (!hresInfo)
return FALSE;
#endif
if (!hresInfo)
return FALSE;
@@
-129,7
+131,7
@@
bool wxWave::Play(bool async, bool looped) const
return FALSE;
#ifdef __WIN32__
return FALSE;
#ifdef __WIN32__
- return ( ::PlaySound((LPCSTR)m_waveData, NULL, SND_MEMORY |
+ return ( ::PlaySound((LPC
T
STR)m_waveData, NULL, SND_MEMORY |
SND_NODEFAULT | (async ? SND_ASYNC : SND_SYNC) | (looped ? (SND_LOOP | SND_ASYNC) : 0)) != 0 );
#else
return ( ::sndPlaySound((LPCSTR)m_waveData, SND_MEMORY |
SND_NODEFAULT | (async ? SND_ASYNC : SND_SYNC) | (looped ? (SND_LOOP | SND_ASYNC) : 0)) != 0 );
#else
return ( ::sndPlaySound((LPCSTR)m_waveData, SND_MEMORY |
@@
-165,4
+167,4
@@
bool wxWave::Free()
return FALSE;
}
return FALSE;
}
-
+#endif // wxUSE_WAVE