@@ -203,10 +203,10 @@ int JackWinThread::AcquireRealTimeImp(jack_native_thread_t thread, int priority) | |||||
jack_log("JackWinThread::AcquireRealTimeImp priority = %d", priority); | jack_log("JackWinThread::AcquireRealTimeImp priority = %d", priority); | ||||
if (priority >= 90 && MMCSSAcquireRealTime(thread) == 0) { | if (priority >= 90 && MMCSSAcquireRealTime(thread) == 0) { | ||||
jack_info("MMCSS API used to acquire RT for thread"); | |||||
jack_log("MMCSS API used to acquire RT for thread"); | |||||
return 0; | return 0; | ||||
} else { | } else { | ||||
jack_info("MMCSS API not used..."); | |||||
jack_log("MMCSS API not used..."); | |||||
if (SetThreadPriority(thread, THREAD_PRIORITY_TIME_CRITICAL)) { | if (SetThreadPriority(thread, THREAD_PRIORITY_TIME_CRITICAL)) { | ||||
return 0; | return 0; | ||||
} else { | } else { | ||||
@@ -228,8 +228,8 @@ int JackWinThread::DropSelfRealTime() | |||||
int JackWinThread::DropRealTimeImp(jack_native_thread_t thread) | int JackWinThread::DropRealTimeImp(jack_native_thread_t thread) | ||||
{ | { | ||||
if (MMCSSDropRealTime(thread) == 0 ) { | |||||
jack_info("MMCSS API used to drop RT for thread"); | |||||
if (MMCSSDropRealTime(thread) == 0) { | |||||
jack_log("MMCSS API used to drop RT for thread"); | |||||
return 0; | return 0; | ||||
} else if (SetThreadPriority(thread, THREAD_PRIORITY_NORMAL)) { | } else if (SetThreadPriority(thread, THREAD_PRIORITY_NORMAL)) { | ||||
return 0; | return 0; | ||||
@@ -15,8 +15,7 @@ | |||||
along with this program; if not, write to the Free Software | along with this program; if not, write to the Free Software | ||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||||
*/ | |||||
*/ | |||||
#include "JackTime.h" | #include "JackTime.h" | ||||
#include "JackError.h" | #include "JackError.h" | ||||
@@ -42,7 +41,7 @@ SERVER_EXPORT void InitTime() | |||||
jack_error("InitTime : could not set minimum timer"); | jack_error("InitTime : could not set minimum timer"); | ||||
gPeriod = 0; | gPeriod = 0; | ||||
} else { | } else { | ||||
jack_info("InitTime : multimedia timer resolution set to %d milliseconds", gPeriod); | |||||
jack_log("InitTime : multimedia timer resolution set to %d milliseconds", gPeriod); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -53,8 +53,8 @@ JackWinMMEDriver::Attach() | |||||
fEngineControl->fSampleRate)); | fEngineControl->fSampleRate)); | ||||
latency_range.min = latency; | latency_range.min = latency; | ||||
jack_info("JackWinMMEDriver::Attach - fCaptureChannels %d", fCaptureChannels); | |||||
jack_info("JackWinMMEDriver::Attach - fPlaybackChannels %d", fPlaybackChannels); | |||||
jack_log("JackWinMMEDriver::Attach - fCaptureChannels %d", fCaptureChannels); | |||||
jack_log("JackWinMMEDriver::Attach - fPlaybackChannels %d", fPlaybackChannels); | |||||
// Inputs | // Inputs | ||||
for (int i = 0; i < fCaptureChannels; i++) { | for (int i = 0; i < fCaptureChannels; i++) { | ||||
@@ -145,8 +145,8 @@ JackWinMMEDriver::Open(bool capturing, bool playing, int in_channels, | |||||
int num_potential_inputs = midiInGetNumDevs(); | int num_potential_inputs = midiInGetNumDevs(); | ||||
int num_potential_outputs = midiOutGetNumDevs(); | int num_potential_outputs = midiOutGetNumDevs(); | ||||
jack_info("JackWinMMEDriver::Open - num_potential_inputs %d", num_potential_inputs); | |||||
jack_info("JackWinMMEDriver::Open - num_potential_outputs %d", num_potential_outputs); | |||||
jack_log("JackWinMMEDriver::Open - num_potential_inputs %d", num_potential_inputs); | |||||
jack_log("JackWinMMEDriver::Open - num_potential_outputs %d", num_potential_outputs); | |||||
period = 0; | period = 0; | ||||
TIMECAPS caps; | TIMECAPS caps; | ||||
@@ -160,10 +160,8 @@ JackWinMMEDriver::Open(bool capturing, bool playing, int in_channels, | |||||
"resolution. Continuing anyway ..."); | "resolution. Continuing anyway ..."); | ||||
period = 0; | period = 0; | ||||
} else { | } else { | ||||
jack_info("JackWinMMEDriver::Open - multimedia timer resolution " | |||||
jack_log("JackWinMMEDriver::Open - multimedia timer resolution " | |||||
"set to %d milliseconds.", period); | "set to %d milliseconds.", period); | ||||
} | } | ||||
} | } | ||||
@@ -210,8 +208,8 @@ JackWinMMEDriver::Open(bool capturing, bool playing, int in_channels, | |||||
} | } | ||||
} | } | ||||
jack_info("JackWinMMEDriver::Open - input_count %d", input_count); | |||||
jack_info("JackWinMMEDriver::Open - output_count %d", output_count); | |||||
jack_log("JackWinMMEDriver::Open - input_count %d", input_count); | |||||
jack_log("JackWinMMEDriver::Open - output_count %d", output_count); | |||||
if (! (input_count || output_count)) { | if (! (input_count || output_count)) { | ||||
jack_error("JackWinMMEDriver::Open - no WinMME inputs or outputs " | jack_error("JackWinMMEDriver::Open - no WinMME inputs or outputs " | ||||
@@ -274,14 +272,14 @@ JackWinMMEDriver::Write() | |||||
int | int | ||||
JackWinMMEDriver::Start() | JackWinMMEDriver::Start() | ||||
{ | { | ||||
jack_info("JackWinMMEDriver::Start - Starting driver."); | |||||
jack_log("JackWinMMEDriver::Start - Starting driver."); | |||||
JackMidiDriver::Start(); | JackMidiDriver::Start(); | ||||
int input_count = 0; | int input_count = 0; | ||||
int output_count = 0; | int output_count = 0; | ||||
jack_info("JackWinMMEDriver::Start - Enabling input ports."); | |||||
jack_log("JackWinMMEDriver::Start - Enabling input ports."); | |||||
for (; input_count < fCaptureChannels; input_count++) { | for (; input_count < fCaptureChannels; input_count++) { | ||||
if (input_ports[input_count]->Start() < 0) { | if (input_ports[input_count]->Start() < 0) { | ||||
@@ -291,7 +289,7 @@ JackWinMMEDriver::Start() | |||||
} | } | ||||
} | } | ||||
jack_info("JackWinMMEDriver::Start - Enabling output ports."); | |||||
jack_log("JackWinMMEDriver::Start - Enabling output ports."); | |||||
for (; output_count < fPlaybackChannels; output_count++) { | for (; output_count < fPlaybackChannels; output_count++) { | ||||
if (output_ports[output_count]->Start() < 0) { | if (output_ports[output_count]->Start() < 0) { | ||||
@@ -301,8 +299,7 @@ JackWinMMEDriver::Start() | |||||
} | } | ||||
} | } | ||||
jack_info("JackWinMMEDriver::Start - Driver started."); | |||||
jack_log("JackWinMMEDriver::Start - Driver started."); | |||||
return 0; | return 0; | ||||
stop_output_ports: | stop_output_ports: | ||||
@@ -330,7 +327,7 @@ JackWinMMEDriver::Stop() | |||||
JackMidiDriver::Stop(); | JackMidiDriver::Stop(); | ||||
jack_info("JackWinMMEDriver::Stop - disabling input ports."); | |||||
jack_log("JackWinMMEDriver::Stop - disabling input ports."); | |||||
for (int i = 0; i < fCaptureChannels; i++) { | for (int i = 0; i < fCaptureChannels; i++) { | ||||
if (input_ports[i]->Stop() < 0) { | if (input_ports[i]->Stop() < 0) { | ||||
@@ -340,7 +337,7 @@ JackWinMMEDriver::Stop() | |||||
} | } | ||||
} | } | ||||
jack_info("JackWinMMEDriver::Stop - disabling output ports."); | |||||
jack_log("JackWinMMEDriver::Stop - disabling output ports."); | |||||
for (int i = 0; i < fPlaybackChannels; i++) { | for (int i = 0; i < fPlaybackChannels; i++) { | ||||
if (output_ports[i]->Stop() < 0) { | if (output_ports[i]->Stop() < 0) { | ||||
@@ -191,8 +191,8 @@ JackWinMMEInputPort::ProcessJack(JackMidiBuffer *port_buffer, | |||||
"event.", jack_event->size); | "event.", jack_event->size); | ||||
// Fallthrough on purpose | // Fallthrough on purpose | ||||
case JackMidiWriteQueue::OK: | case JackMidiWriteQueue::OK: | ||||
continue; | |||||
default: | |||||
continue; | |||||
default: | |||||
break; | break; | ||||
} | } | ||||
break; | break; | ||||
@@ -205,10 +205,10 @@ JackWinMMEInputPort::ProcessWinMME(UINT message, DWORD param1, DWORD param2) | |||||
set_threaded_log_function(); | set_threaded_log_function(); | ||||
switch (message) { | switch (message) { | ||||
case MIM_CLOSE: | case MIM_CLOSE: | ||||
jack_info("JackWinMMEInputPort::ProcessWinMME - MIDI device closed."); | |||||
jack_log("JackWinMMEInputPort::ProcessWinMME - MIDI device closed."); | |||||
break; | break; | ||||
case MIM_MOREDATA: | case MIM_MOREDATA: | ||||
jack_info("JackWinMMEInputPort::ProcessWinMME - The MIDI input device " | |||||
jack_log("JackWinMMEInputPort::ProcessWinMME - The MIDI input device " | |||||
"driver thinks that JACK is not processing messages fast " | "driver thinks that JACK is not processing messages fast " | ||||
"enough."); | "enough."); | ||||
// Fallthrough on purpose. | // Fallthrough on purpose. | ||||
@@ -245,7 +245,7 @@ JackWinMMEInputPort::ProcessWinMME(UINT message, DWORD param1, DWORD param2) | |||||
LPMIDIHDR header = (LPMIDIHDR) param1; | LPMIDIHDR header = (LPMIDIHDR) param1; | ||||
size_t byte_count = header->dwBytesRecorded; | size_t byte_count = header->dwBytesRecorded; | ||||
if (! byte_count) { | if (! byte_count) { | ||||
jack_info("JackWinMMEInputPort::ProcessWinMME - WinMME driver has " | |||||
jack_log("JackWinMMEInputPort::ProcessWinMME - WinMME driver has " | |||||
"returned sysex header to us with no bytes. The JACK " | "returned sysex header to us with no bytes. The JACK " | ||||
"driver is probably being stopped."); | "driver is probably being stopped."); | ||||
break; | break; | ||||
@@ -273,7 +273,7 @@ JackWinMMEInputPort::ProcessWinMME(UINT message, DWORD param1, DWORD param2) | |||||
"incomplete sysex message received."); | "incomplete sysex message received."); | ||||
break; | break; | ||||
case MIM_OPEN: | case MIM_OPEN: | ||||
jack_info("JackWinMMEInputPort::ProcessWinMME - MIDI device opened."); | |||||
jack_log("JackWinMMEInputPort::ProcessWinMME - MIDI device opened."); | |||||
} | } | ||||
} | } | ||||
@@ -22,8 +22,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||||
#include "JackMidiUtil.h" | #include "JackMidiUtil.h" | ||||
#include "JackTime.h" | #include "JackTime.h" | ||||
#include "JackWinMMEOutputPort.h" | |||||
#include "JackGlobals.h" | |||||
#include "JackWinMMEOutputPort.h" | |||||
#include "JackGlobals.h" | |||||
#include "JackEngineControl.h" | #include "JackEngineControl.h" | ||||
using Jack::JackWinMMEOutputPort; | using Jack::JackWinMMEOutputPort; | ||||
@@ -46,8 +46,8 @@ JackWinMMEOutputPort::HandleMessageEvent(HMIDIOUT handle, UINT message, | |||||
JackWinMMEOutputPort::JackWinMMEOutputPort(const char *alias_name, | JackWinMMEOutputPort::JackWinMMEOutputPort(const char *alias_name, | ||||
const char *client_name, | const char *client_name, | ||||
const char *driver_name, | |||||
UINT index, | |||||
const char *driver_name, | |||||
UINT index, | |||||
size_t max_bytes, | size_t max_bytes, | ||||
size_t max_messages) | size_t max_messages) | ||||
{ | { | ||||
@@ -89,7 +89,7 @@ JackWinMMEOutputPort::JackWinMMEOutputPort(const char *alias_name, | |||||
snprintf(name, sizeof(name) - 1, "%s:playback_%d", client_name, index + 1); | snprintf(name, sizeof(name) - 1, "%s:playback_%d", client_name, index + 1); | ||||
read_queue_ptr.release(); | read_queue_ptr.release(); | ||||
thread_queue_ptr.release(); | thread_queue_ptr.release(); | ||||
thread_ptr.release(); | |||||
thread_ptr.release(); | |||||
return; | return; | ||||
destroy_thread_queue_semaphore: | destroy_thread_queue_semaphore: | ||||
@@ -255,17 +255,17 @@ JackWinMMEOutputPort::HandleMessage(UINT message, DWORD_PTR param1, | |||||
set_threaded_log_function(); | set_threaded_log_function(); | ||||
switch (message) { | switch (message) { | ||||
case MOM_CLOSE: | case MOM_CLOSE: | ||||
jack_info("JackWinMMEOutputPort::HandleMessage - MIDI device closed."); | |||||
jack_log("JackWinMMEOutputPort::HandleMessage - MIDI device closed."); | |||||
break; | break; | ||||
case MOM_DONE: | case MOM_DONE: | ||||
Signal(sysex_semaphore); | Signal(sysex_semaphore); | ||||
break; | break; | ||||
case MOM_OPEN: | case MOM_OPEN: | ||||
jack_info("JackWinMMEOutputPort::HandleMessage - MIDI device opened."); | |||||
jack_log("JackWinMMEOutputPort::HandleMessage - MIDI device opened."); | |||||
break; | break; | ||||
case MOM_POSITIONCB: | case MOM_POSITIONCB: | ||||
LPMIDIHDR header = (LPMIDIHDR) param1; | LPMIDIHDR header = (LPMIDIHDR) param1; | ||||
jack_info("JackWinMMEOutputPort::HandleMessage - %d bytes out of %d " | |||||
jack_log("JackWinMMEOutputPort::HandleMessage - %d bytes out of %d " | |||||
"bytes of the current sysex message have been sent.", | "bytes of the current sysex message have been sent.", | ||||
header->dwOffset, header->dwBytesRecorded); | header->dwOffset, header->dwBytesRecorded); | ||||
} | } | ||||
@@ -343,7 +343,7 @@ JackWinMMEOutputPort::Start() | |||||
bool | bool | ||||
JackWinMMEOutputPort::Stop() | JackWinMMEOutputPort::Stop() | ||||
{ | { | ||||
jack_info("JackWinMMEOutputPort::Stop - stopping MIDI output port " | |||||
jack_log("JackWinMMEOutputPort::Stop - stopping MIDI output port " | |||||
"processing thread."); | "processing thread."); | ||||
int result; | int result; | ||||