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
This commit is contained in:
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -117,6 +117,7 @@ bool wxSoundAiff::PrepareToPlay()
|
||||
// "FORM"
|
||||
|
||||
len = data.Read32();
|
||||
wxUnusedVar(len);
|
||||
FAIL_WITH(m_input->LastRead() != 4, wxSOUND_INVSTRM);
|
||||
// dummy len
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -196,6 +196,7 @@ bool wxSoundWave::PrepareToPlay()
|
||||
// "RIFF"
|
||||
|
||||
len = data.Read32();
|
||||
wxUnusedVar(len);
|
||||
FAIL_WITH(m_input->LastRead() != 4, wxSOUND_INVSTRM);
|
||||
// dummy len
|
||||
|
||||
|
@@ -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 {
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user