From d93966b92aa5237f41ca16e829b13e9d82829513 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 2 Feb 2004 13:03:23 +0000 Subject: [PATCH] renamed wxWave to wxSound git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/joytest/Makefile.in | 4 +++- samples/joytest/joytest.cpp | 10 +++++----- samples/joytest/joytest.h | 6 +++--- samples/sound/sound.cpp | 20 ++++++++++---------- utils/configtool/configs/wxwin250.wxs | 8 ++++---- 5 files changed, 25 insertions(+), 23 deletions(-) diff --git a/samples/joytest/Makefile.in b/samples/joytest/Makefile.in index 71b20867d2..cba25fb0b7 100644 --- a/samples/joytest/Makefile.in +++ b/samples/joytest/Makefile.in @@ -28,6 +28,7 @@ TOOLKIT_VERSION = @TOOLKIT_VERSION@ TOOLCHAIN_NAME = @TOOLCHAIN_NAME@ EXTRALIBS = @EXTRALIBS@ EXTRALIBS_GUI = @EXTRALIBS_GUI@ +EXTRALIBS_SDL = @EXTRALIBS_SDL@ HOST_SUFFIX = @HOST_SUFFIX@ SAMPLES_RPATH_FLAG = @SAMPLES_RPATH_FLAG@ SAMPLES_RPATH_POSTLINK = @SAMPLES_RPATH_POSTLINK@ @@ -48,6 +49,7 @@ JOYTEST_OBJECTS = \ @COND_DEPS_TRACKING_0@CXXC = $(CXX) @COND_DEPS_TRACKING_1@CXXC = $(top_builddir)./bk-deps $(CXX) +@COND_USE_PLUGINS_0@PLUGIN_ADV_EXTRALIBS = $(EXTRALIBS_SDL) @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon @@ -125,7 +127,7 @@ distclean: clean rm -f configure config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile joytest$(EXEEXT): $(JOYTEST_OBJECTS) $(__joytest___win32rc) - $(CXX) -o $@ $(JOYTEST_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_ADV_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) + $(CXX) -o $@ $(JOYTEST_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_ADV_p) $(PLUGIN_ADV_EXTRALIBS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__joytest___mac_rezcmd) $(__joytest___mac_setfilecmd) $(__joytest___os2_emxbindcmd) diff --git a/samples/joytest/joytest.cpp b/samples/joytest/joytest.cpp index 8b9b07c3a0..4d5be8b350 100644 --- a/samples/joytest/joytest.cpp +++ b/samples/joytest/joytest.cpp @@ -28,7 +28,7 @@ # error You must set wxUSE_STATUSBAR to 1 in setup.h #endif -#include "wx/wave.h" +#include "wx/sound.h" #include "wx/joystick.h" #include "joytest.h" @@ -53,9 +53,9 @@ bool MyApp::OnInit() return FALSE; } -#if wxUSE_WAVE +#if wxUSE_SOUND m_fire.Create(_T("gun.wav")); -#endif // wxUSE_WAVE +#endif // wxUSE_SOUND m_maxX = stick.GetXMax(); m_maxY = stick.GetYMax(); @@ -143,12 +143,12 @@ void MyCanvas::OnJoystickEvent(wxJoystickEvent& event) frame->SetStatusText(buf); -#if wxUSE_WAVE +#if wxUSE_SOUND if (event.ButtonDown() && wxGetApp().m_fire.IsOk()) { wxGetApp().m_fire.Play(); } -#endif // wxUSE_WAVE +#endif // wxUSE_SOUND } BEGIN_EVENT_TABLE(MyFrame, wxFrame) diff --git a/samples/joytest/joytest.h b/samples/joytest/joytest.h index bbe8c582a4..aed89d553f 100644 --- a/samples/joytest/joytest.h +++ b/samples/joytest/joytest.h @@ -19,9 +19,9 @@ public: int m_maxX; int m_maxY; -#if wxUSE_WAVE - wxWave m_fire; -#endif // wxUSE_WAVE +#if wxUSE_SOUND + wxSound m_fire; +#endif // wxUSE_SOUND }; DECLARE_APP(MyApp) diff --git a/samples/sound/sound.cpp b/samples/sound/sound.cpp index 77f57b9685..fd472471e4 100644 --- a/samples/sound/sound.cpp +++ b/samples/sound/sound.cpp @@ -24,7 +24,7 @@ #include "wx/msgdlg.h" #endif -#include "wx/wave.h" +#include "wx/sound.h" // ---------------------------------------------------------------------------- // resources @@ -65,7 +65,7 @@ public: void OnAbout(wxCommandEvent& event); private: - wxWave *m_sound; + wxSound *m_sound; // any class wishing to process wxWindows events must use this macro DECLARE_EVENT_TABLE() @@ -180,35 +180,35 @@ void MyFrame::OnPlaySync(wxCommandEvent& WXUNUSED(event)) { wxBusyCursor busy; if (!m_sound) - m_sound = new wxWave(WAV_FILE); + m_sound = new wxSound(WAV_FILE); if (m_sound->IsOk()) - m_sound->Play(false/*async*/); + m_sound->Play(wxSOUND_SYNC); } void MyFrame::OnPlayAsync(wxCommandEvent& WXUNUSED(event)) { wxBusyCursor busy; if (!m_sound) - m_sound = new wxWave(WAV_FILE); + m_sound = new wxSound(WAV_FILE); if (m_sound->IsOk()) - m_sound->Play(true/*async*/); + m_sound->Play(wxSOUND_ASYNC); } void MyFrame::OnPlayAsyncOnStack(wxCommandEvent& WXUNUSED(event)) { wxBusyCursor busy; - wxWave snd(WAV_FILE); + wxSound snd(WAV_FILE); if (snd.IsOk()) - snd.Play(true/*async*/); + snd.Play(wxSOUND_ASYNC); } void MyFrame::OnPlayLoop(wxCommandEvent& WXUNUSED(event)) { wxBusyCursor busy; if (!m_sound) - m_sound = new wxWave(WAV_FILE); + m_sound = new wxSound(WAV_FILE); if (m_sound->IsOk()) - m_sound->Play(true/*async*/, true/*loop*/); + m_sound->Play(wxSOUND_ASYNC | wxSOUND_LOOP); } void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) diff --git a/utils/configtool/configs/wxwin250.wxs b/utils/configtool/configs/wxwin250.wxs index f705fe06be..11fb210891 100644 --- a/utils/configtool/configs/wxwin250.wxs +++ b/utils/configtool/configs/wxwin250.wxs @@ -3803,8 +3803,8 @@ A class for setting miscellaneous options that do not fit in with the wxWindows 1 1 - wxUSE_WAVE - <B>wxWave</B><P> + wxUSE_SOUND + <B>wxSound</B><P> Simple .wav class for short sounds. 1 @@ -3815,8 +3815,8 @@ Simple .wav class for short sounds. - --enable-wave - wxWave + --enable-sound + wxSound -- 2.45.2