From 87af94ddfcadedde6bac43d740540a210278922d Mon Sep 17 00:00:00 2001 From: sletz Date: Fri, 8 Apr 2011 12:15:17 +0000 Subject: [PATCH] Update WinMME driver for 64 bits compilation. git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4289 0c269be4-1314-0410-8aa9-9f06e86f4224 --- common/JackControlAPI.cpp | 9 +++++---- windows/winmme/JackWinMMEInputPort.cpp | 4 ++-- windows/winmme/JackWinMMEOutputPort.cpp | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/common/JackControlAPI.cpp b/common/JackControlAPI.cpp index 6312ee46..2490a65e 100644 --- a/common/JackControlAPI.cpp +++ b/common/JackControlAPI.cpp @@ -1236,13 +1236,14 @@ EXPORT bool jackctl_server_remove_slave(jackctl_server * server_ptr, jackctl_dri if (server_ptr->engine->IsRunning()) { jack_error("cannot remove a slave from a running server"); return false; - } else { - JackDriverInfo* info = (JackDriverInfo*)driver_ptr->infos->data; - if (info) { + } else { + if (driver_ptr->infos) { + JackDriverInfo* info = (JackDriverInfo*)driver_ptr->infos->data; + assert(info); driver_ptr->infos = jack_slist_remove(driver_ptr->infos, info); server_ptr->engine->RemoveSlave(info); delete info; - return true; + return true; } else { return false; } diff --git a/windows/winmme/JackWinMMEInputPort.cpp b/windows/winmme/JackWinMMEInputPort.cpp index 9dabf2d5..a9ef814d 100644 --- a/windows/winmme/JackWinMMEInputPort.cpp +++ b/windows/winmme/JackWinMMEInputPort.cpp @@ -55,8 +55,8 @@ JackWinMMEInputPort::JackWinMMEInputPort(const char *alias_name, std::auto_ptr write_queue_ptr(write_queue); sysex_buffer = new jack_midi_data_t[max_bytes]; char error_message[MAXERRORLENGTH]; - MMRESULT result = midiInOpen(&handle, index, (DWORD)HandleMidiInputEvent, - (DWORD)this, + MMRESULT result = midiInOpen(&handle, index, (DWORD_PTR)HandleMidiInputEvent, + (DWORD_PTR)this, CALLBACK_FUNCTION | MIDI_IO_STATUS); if (result != MMSYSERR_NOERROR) { GetInErrorString(result, error_message); diff --git a/windows/winmme/JackWinMMEOutputPort.cpp b/windows/winmme/JackWinMMEOutputPort.cpp index fea0aa53..59ece6ef 100644 --- a/windows/winmme/JackWinMMEOutputPort.cpp +++ b/windows/winmme/JackWinMMEOutputPort.cpp @@ -55,8 +55,8 @@ JackWinMMEOutputPort::JackWinMMEOutputPort(const char *alias_name, thread = new JackThread(this); std::auto_ptr thread_ptr(thread); char error_message[MAXERRORLENGTH]; - MMRESULT result = midiOutOpen(&handle, index, (DWORD)HandleMessageEvent, - (DWORD)this, CALLBACK_FUNCTION); + MMRESULT result = midiOutOpen(&handle, index, (DWORD_PTR)HandleMessageEvent, + (DWORD_PTR)this, CALLBACK_FUNCTION); if (result != MMSYSERR_NOERROR) { GetOutErrorString(result, error_message); goto raise_exception;