From 2b3644c7150647206f57924e26ef71793ef5fa27 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 8 Feb 2004 11:56:22 +0000 Subject: [PATCH] Applied patch [ 875663 ] Warning free mmedia contrib ABX git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/include/wx/mmedia/vidwin.h | 6 ++++++ contrib/samples/mmedia/mmbman.cpp | 4 +++- contrib/src/mmedia/cdwin.cpp | 13 ++++++------- contrib/src/mmedia/sndaiff.cpp | 1 + contrib/src/mmedia/sndbase.cpp | 4 ++-- contrib/src/mmedia/sndcpcm.cpp | 1 + contrib/src/mmedia/sndwav.cpp | 1 + contrib/src/mmedia/sndwin.cpp | 2 +- contrib/src/mmedia/vidwin.cpp | 6 ++++-- 9 files changed, 25 insertions(+), 13 deletions(-) diff --git a/contrib/include/wx/mmedia/vidwin.h b/contrib/include/wx/mmedia/vidwin.h index c0b0a319ae..f92e5f02a6 100644 --- a/contrib/include/wx/mmedia/vidwin.h +++ b/contrib/include/wx/mmedia/vidwin.h @@ -15,6 +15,10 @@ #pragma interface "vidwin.h" #endif +#if defined(__WINDOWS__) && !defined(__MINGW32__) && !defined(__WATCOMC__) +// versions of Open Watcom and MinGW tested against this source does not +// deliver "digitalv.h" required in this feature + // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- @@ -100,3 +104,5 @@ public: }; #endif + +#endif diff --git a/contrib/samples/mmedia/mmbman.cpp b/contrib/samples/mmedia/mmbman.cpp index fbb30965a5..e930e07a88 100644 --- a/contrib/samples/mmedia/mmbman.cpp +++ b/contrib/samples/mmedia/mmbman.cpp @@ -357,7 +357,9 @@ MMBoardVideoFile::MMBoardVideoFile(const wxString& filename) #if defined(__UNIX__) m_video_driver = new wxVideoXANIM(filename); -#elif defined(__WIN32__) +#elif defined(__WINDOWS__) && !defined(__MINGW32__) && !defined(__WATCOMC__) + // versions of Open Watcom and MinGW tested against this source does not + // deliver "digitalv.h" required in this feature m_video_driver = new wxVideoWindows(filename); #else m_video_driver = NULL; diff --git a/contrib/src/mmedia/cdwin.cpp b/contrib/src/mmedia/cdwin.cpp index 3360732204..1752cc1810 100644 --- a/contrib/src/mmedia/cdwin.cpp +++ b/contrib/src/mmedia/cdwin.cpp @@ -46,15 +46,14 @@ IMPLEMENT_DYNAMIC_CLASS(wxCDAudioWin, wxCDAudio) wxCDAudioWin::wxCDAudioWin(void) - : wxCDAudio(), m_trksize(NULL), m_trkpos(NULL), m_ok(TRUE), m_toc(NULL) + : wxCDAudio(), m_trksize(NULL), m_trkpos(NULL), m_toc(NULL), m_ok(TRUE) { MCI_OPEN_PARMS open_struct; MCI_SET_PARMS set_struct; - DWORD ret; m_internal = new CDAW_Internal; open_struct.lpstrDeviceType = _T("cdaudio"); - ret = mciSendCommand(NULL, MCI_OPEN, MCI_OPEN_TYPE, + DWORD ret = mciSendCommand((MCIDEVICEID)NULL, MCI_OPEN, MCI_OPEN_TYPE, (DWORD)&open_struct); if (ret) { m_ok = FALSE; @@ -63,20 +62,20 @@ wxCDAudioWin::wxCDAudioWin(void) m_internal->dev_id = open_struct.wDeviceID; set_struct.dwTimeFormat = MCI_FORMAT_MSF; - ret = mciSendCommand(m_internal->dev_id, MCI_SET, MCI_SET_TIME_FORMAT, + mciSendCommand(m_internal->dev_id, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD)(LPVOID)&set_struct); PrepareToc(); set_struct.dwTimeFormat = MCI_FORMAT_TMSF; - ret = mciSendCommand(m_internal->dev_id, MCI_SET, MCI_SET_TIME_FORMAT, + mciSendCommand(m_internal->dev_id, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD)(LPVOID)&set_struct); } wxCDAudioWin::~wxCDAudioWin(void) { if (m_ok) { - mciSendCommand(m_internal->dev_id, MCI_CLOSE, 0, NULL); + mciSendCommand(m_internal->dev_id, MCI_CLOSE, 0,(DWORD_PTR)NULL); delete m_toc; delete[] m_trksize; delete[] m_trkpos; @@ -202,7 +201,7 @@ wxCDAudio::CDstatus wxCDAudioWin::GetStatus(void) wxCDtime wxCDAudioWin::GetTime(void) { MCI_STATUS_PARMS status_struct; - wxCDtime cd_time = {-1, -1, -1, -1}; + wxCDtime cd_time = {0,0,0,0}; if (!m_ok) return cd_time; diff --git a/contrib/src/mmedia/sndaiff.cpp b/contrib/src/mmedia/sndaiff.cpp index c0427a7493..6174200eb2 100644 --- a/contrib/src/mmedia/sndaiff.cpp +++ b/contrib/src/mmedia/sndaiff.cpp @@ -117,6 +117,7 @@ bool wxSoundAiff::PrepareToPlay() // "FORM" len = data.Read32(); + wxUnusedVar(len); FAIL_WITH(m_input->LastRead() != 4, wxSOUND_INVSTRM); // dummy len diff --git a/contrib/src/mmedia/sndbase.cpp b/contrib/src/mmedia/sndbase.cpp index e331e0edce..ed3ea6ecc7 100644 --- a/contrib/src/mmedia/sndbase.cpp +++ b/contrib/src/mmedia/sndbase.cpp @@ -34,8 +34,8 @@ wxSoundFormatBase::~wxSoundFormatBase() wxSoundFormatBase *wxSoundFormatBase::Clone() const { - wxLogFatalError(wxT("In wxSoundFormatBase::Clone() but I should" - " not be there")); + wxLogFatalError(wxT("In wxSoundFormatBase::Clone() but I should") + wxT(" not be there")); return NULL; } diff --git a/contrib/src/mmedia/sndcpcm.cpp b/contrib/src/mmedia/sndcpcm.cpp index 8dc836e5e8..3e922ba392 100644 --- a/contrib/src/mmedia/sndcpcm.cpp +++ b/contrib/src/mmedia/sndcpcm.cpp @@ -396,6 +396,7 @@ bool wxSoundStreamPcm::SetSoundFormat(const wxSoundFormatBase& format) SetSoundFormatReturn = m_sndio->SetSoundFormat(*new_format); wxASSERT( SetSoundFormatReturn ); + wxUnusedVar( SetSoundFormatReturn ); m_sndformat = new_format; return TRUE; diff --git a/contrib/src/mmedia/sndwav.cpp b/contrib/src/mmedia/sndwav.cpp index a32c2a20c4..75f5bf9e59 100644 --- a/contrib/src/mmedia/sndwav.cpp +++ b/contrib/src/mmedia/sndwav.cpp @@ -196,6 +196,7 @@ bool wxSoundWave::PrepareToPlay() // "RIFF" len = data.Read32(); + wxUnusedVar(len); FAIL_WITH(m_input->LastRead() != 4, wxSOUND_INVSTRM); // dummy len diff --git a/contrib/src/mmedia/sndwin.cpp b/contrib/src/mmedia/sndwin.cpp index 7e0795e895..ea2cbe2b69 100644 --- a/contrib/src/mmedia/sndwin.cpp +++ b/contrib/src/mmedia/sndwin.cpp @@ -53,7 +53,7 @@ static inline wxSoundStreamWin *wxFindSoundFromHandle(WXHWND hWnd) wxNode *node = wxSoundHandleList->Find((long)hWnd); if (!node) return NULL; - return (wxSoundStreamWin *)node->Data(); + return (wxSoundStreamWin *)node->GetData(); } struct _wxSoundInternal { diff --git a/contrib/src/mmedia/vidwin.cpp b/contrib/src/mmedia/vidwin.cpp index 608d1ae029..d5f1c4741e 100644 --- a/contrib/src/mmedia/vidwin.cpp +++ b/contrib/src/mmedia/vidwin.cpp @@ -18,7 +18,9 @@ #include "wx/wx.h" #endif -#if defined(__WINDOWS__) && !defined(__GNUWIN32__) && !defined(__WATCOMC__) +#if defined(__WINDOWS__) && !defined(__MINGW32__) && !defined(__WATCOMC__) +// versions of Open Watcom and MinGW tested against this source does not +// deliver "digitalv.h" required in this feature #ifdef __BORLANDC__ #pragma hdrstop @@ -86,7 +88,7 @@ void wxVideoWindows::OpenFile() MCI_STATUS_PARMS statusStruct; openStruct.lpstrDeviceType = _T("avivideo"); - openStruct.lpstrElementName = (wxChar *)m_filename.mb_str().data(); + openStruct.lpstrElementName = (wxChar *)m_filename.c_str(); openStruct.hWndParent = 0; mciSendCommand(0, MCI_OPEN, -- 2.45.2