| @@ -102,12 +102,6 @@ | |||||
| <Add library="libjackserver" /> | <Add library="libjackserver" /> | ||||
| <Add library="winmm" /> | <Add library="winmm" /> | ||||
| </Linker> | </Linker> | ||||
| <Unit filename="..\common\JackMidiAsyncQueue.cpp" /> | |||||
| <Unit filename="..\common\JackMidiBufferReadQueue.cpp" /> | |||||
| <Unit filename="..\common\JackMidiBufferWriteQueue.cpp" /> | |||||
| <Unit filename="..\common\JackMidiReadQueue.cpp" /> | |||||
| <Unit filename="..\common\JackMidiUtil.cpp" /> | |||||
| <Unit filename="..\common\JackMidiWriteQueue.cpp" /> | |||||
| <Unit filename="jackwinmme.rc"> | <Unit filename="jackwinmme.rc"> | ||||
| <Option compilerVar="WINDRES" /> | <Option compilerVar="WINDRES" /> | ||||
| </Unit> | </Unit> | ||||
| @@ -117,6 +111,7 @@ | |||||
| <Unit filename="winmme\JackWinMMEInputPort.h" /> | <Unit filename="winmme\JackWinMMEInputPort.h" /> | ||||
| <Unit filename="winmme\JackWinMMEOutputPort.cpp" /> | <Unit filename="winmme\JackWinMMEOutputPort.cpp" /> | ||||
| <Unit filename="winmme\JackWinMMEOutputPort.h" /> | <Unit filename="winmme\JackWinMMEOutputPort.h" /> | ||||
| <Unit filename="winmme\JackWinMMEPort.cpp" /> | |||||
| <Extensions> | <Extensions> | ||||
| <code_completion /> | <code_completion /> | ||||
| <envvars /> | <envvars /> | ||||
| @@ -150,8 +150,14 @@ | |||||
| <Unit filename="..\common\JackLoopbackDriver.cpp" /> | <Unit filename="..\common\JackLoopbackDriver.cpp" /> | ||||
| <Unit filename="..\common\JackMessageBuffer.cpp" /> | <Unit filename="..\common\JackMessageBuffer.cpp" /> | ||||
| <Unit filename="..\common\JackMidiAPI.cpp" /> | <Unit filename="..\common\JackMidiAPI.cpp" /> | ||||
| <Unit filename="..\common\JackMidiAsyncQueue.cpp" /> | |||||
| <Unit filename="..\common\JackMidiBufferReadQueue.cpp" /> | |||||
| <Unit filename="..\common\JackMidiBufferWriteQueue.cpp" /> | |||||
| <Unit filename="..\common\JackMidiDriver.cpp" /> | <Unit filename="..\common\JackMidiDriver.cpp" /> | ||||
| <Unit filename="..\common\JackMidiPort.cpp" /> | <Unit filename="..\common\JackMidiPort.cpp" /> | ||||
| <Unit filename="..\common\JackMidiReadQueue.cpp" /> | |||||
| <Unit filename="..\common\JackMidiUtil.cpp" /> | |||||
| <Unit filename="..\common\JackMidiWriteQueue.cpp" /> | |||||
| <Unit filename="..\common\JackNetInterface.cpp" /> | <Unit filename="..\common\JackNetInterface.cpp" /> | ||||
| <Unit filename="..\common\JackNetTool.cpp" /> | <Unit filename="..\common\JackNetTool.cpp" /> | ||||
| <Unit filename="..\common\JackPort.cpp" /> | <Unit filename="..\common\JackPort.cpp" /> | ||||
| @@ -78,16 +78,18 @@ JackWinMMEInputPort::JackWinMMEInputPort(const char *alias_name, | |||||
| GetInErrorString(result, error_message); | GetInErrorString(result, error_message); | ||||
| goto unprepare_header; | goto unprepare_header; | ||||
| } | } | ||||
| MIDIINCAPS capabilities; | MIDIINCAPS capabilities; | ||||
| char *name_tmp; | char *name_tmp; | ||||
| result = midiInGetDevCaps(index, &capabilities, sizeof(capabilities)); | result = midiInGetDevCaps(index, &capabilities, sizeof(capabilities)); | ||||
| if (result != MMSYSERR_NOERROR) { | if (result != MMSYSERR_NOERROR) { | ||||
| WriteInError("JackWinMMEInputPort [constructor]", "midiInGetDevCaps", | WriteInError("JackWinMMEInputPort [constructor]", "midiInGetDevCaps", | ||||
| result); | result); | ||||
| name_tmp = driver_name; | |||||
| name_tmp = (char*) driver_name; | |||||
| } else { | } else { | ||||
| name_tmp = capabilities.szPname; | name_tmp = capabilities.szPname; | ||||
| } | } | ||||
| snprintf(alias, sizeof(alias) - 1, "%s:%s:in%d", alias_name, name_tmp, | snprintf(alias, sizeof(alias) - 1, "%s:%s:in%d", alias_name, name_tmp, | ||||
| index + 1); | index + 1); | ||||
| snprintf(name, sizeof(name) - 1, "%s:capture_%d", client_name, index + 1); | snprintf(name, sizeof(name) - 1, "%s:capture_%d", client_name, index + 1); | ||||
| @@ -28,7 +28,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||||
| namespace Jack { | namespace Jack { | ||||
| class JackWinMMEInputPort : public JackRunnableInterface { | |||||
| class JackWinMMEInputPort : public JackWinMMEPort { | |||||
| private: | private: | ||||
| @@ -53,13 +53,14 @@ namespace Jack { | |||||
| bool started; | bool started; | ||||
| void | |||||
| WriteOSError(const char *jack_func, const char *os_func); | |||||
| void | void | ||||
| WriteInError(const char *jack_func, const char *mm_func, | WriteInError(const char *jack_func, const char *mm_func, | ||||
| MMRESULT result); | MMRESULT result); | ||||
| void | |||||
| GetInErrorString(MMRESULT error, LPTSTR text); | |||||
| public: | public: | ||||
| JackWinMMEInputPort(const char *alias_name, const char *client_name, | JackWinMMEInputPort(const char *alias_name, const char *client_name, | ||||
| @@ -77,7 +77,7 @@ JackWinMMEOutputPort::JackWinMMEOutputPort(const char *alias_name, | |||||
| if (result != MMSYSERR_NOERROR) { | if (result != MMSYSERR_NOERROR) { | ||||
| WriteOutError("JackWinMMEOutputPort [constructor]", "midiOutGetDevCaps", | WriteOutError("JackWinMMEOutputPort [constructor]", "midiOutGetDevCaps", | ||||
| result); | result); | ||||
| name_tmp = driver_name; | |||||
| name_tmp = (char*)driver_name; | |||||
| } else { | } else { | ||||
| name_tmp = capabilities.szPname; | name_tmp = capabilities.szPname; | ||||
| } | } | ||||
| @@ -369,6 +369,6 @@ JackWinMMEOutputPort::WriteOutError(const char *jack_func, const char *mm_func, | |||||
| MMRESULT result) | MMRESULT result) | ||||
| { | { | ||||
| char error_message[MAXERRORLENGTH]; | char error_message[MAXERRORLENGTH]; | ||||
| GetMMErrorString(result, error_message); | |||||
| GetOutErrorString(result, error_message); | |||||
| jack_error("%s - %s: %s", jack_func, mm_func, error_message); | jack_error("%s - %s: %s", jack_func, mm_func, error_message); | ||||
| } | } | ||||
| @@ -20,12 +20,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||||
| #ifndef __JackWinMMEOutputPort__ | #ifndef __JackWinMMEOutputPort__ | ||||
| #define __JackWinMMEOutputPort__ | #define __JackWinMMEOutputPort__ | ||||
| #include <mmsystem.h> | |||||
| #include <windows.h> | |||||
| #include "JackMidiAsyncQueue.h" | #include "JackMidiAsyncQueue.h" | ||||
| #include "JackMidiBufferReadQueue.h" | #include "JackMidiBufferReadQueue.h" | ||||
| #include "JackThread.h" | #include "JackThread.h" | ||||
| #include "JackWinMMEPort.h" | |||||
| namespace Jack { | namespace Jack { | ||||
| @@ -21,6 +21,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||||
| #include <stdexcept> | #include <stdexcept> | ||||
| #include "JackWinMMEPort.h" | #include "JackWinMMEPort.h" | ||||
| #include "JackError.h" | |||||
| using Jack::JackWinMMEPort; | using Jack::JackWinMMEPort; | ||||
| @@ -28,16 +29,14 @@ using Jack::JackWinMMEPort; | |||||
| // Class | // Class | ||||
| /////////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////////// | ||||
| JackWinMMEPort::JackWinMMEPort(const char *alias_name, | |||||
| const char *client_name, | |||||
| const char *driver_name) | |||||
| JackWinMMEPort::JackWinMMEPort() | |||||
| {} | {} | ||||
| JackWinMMEPort::~JackWinMMEPort() | JackWinMMEPort::~JackWinMMEPort() | ||||
| {} | {} | ||||
| const JackWinMMEPort * | |||||
| JackWinMMEOutputPort::GetAlias() | |||||
| const char * | |||||
| JackWinMMEPort::GetAlias() | |||||
| { | { | ||||
| return alias; | return alias; | ||||
| } | } | ||||
| @@ -20,8 +20,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||||
| #ifndef __JackWinMMEPort__ | #ifndef __JackWinMMEPort__ | ||||
| #define __JackWinMMEPort__ | #define __JackWinMMEPort__ | ||||
| #include <mmsystem.h> | |||||
| #include <windows.h> | #include <windows.h> | ||||
| #include <mmsystem.h> | |||||
| #include "JackConstants.h" | |||||
| namespace Jack { | namespace Jack { | ||||
| @@ -34,8 +36,7 @@ namespace Jack { | |||||
| public: | public: | ||||
| JackWinMMEPort(const char *alias_name, const char *client_name, | |||||
| const char *driver_name); | |||||
| JackWinMMEPort(); | |||||
| ~JackWinMMEPort(); | ~JackWinMMEPort(); | ||||
| @@ -49,7 +50,7 @@ namespace Jack { | |||||
| GetOSErrorString(LPTSTR text); | GetOSErrorString(LPTSTR text); | ||||
| void | void | ||||
| GetInErrorString(MMRESULT error, LPTSTR text); | |||||
| WriteOSError(const char *jack_func, const char *os_func); | |||||
| }; | }; | ||||