Browse Source

Fix merge conflicts.

tags/1.9.8
Devin Anderson 14 years ago
parent
commit
06787566d6
6 changed files with 50 additions and 22 deletions
  1. +1
    -1
      common/shm.h
  2. +2
    -2
      windows/jackd.workspace
  3. +28
    -11
      windows/winmme/JackWinMMEDriver.cpp
  4. +6
    -6
      windows/winmme/JackWinMMEInputPort.cpp
  5. +4
    -2
      windows/winmme/JackWinMMEInputPort.h
  6. +9
    -0
      windows/winmme/JackWinMMEOutputPort.cpp

+ 1
- 1
common/shm.h View File

@@ -14,7 +14,7 @@ extern "C"
{ {
#endif #endif


#define MAX_SERVERS 8 /* maximum concurrent servers */
#define MAX_SERVERS 64 /* maximum concurrent servers */
#define MAX_SHM_ID 256 /* generally about 16 per server */ #define MAX_SHM_ID 256 /* generally about 16 per server */
#define JACK_SERVER_NAME_SIZE 256 /* maximum length of server name */ #define JACK_SERVER_NAME_SIZE 256 /* maximum length of server name */
#define JACK_SHM_MAGIC 0x4a41434b /* shm magic number: "JACK" */ #define JACK_SHM_MAGIC 0x4a41434b /* shm magic number: "JACK" */


+ 2
- 2
windows/jackd.workspace View File

@@ -5,7 +5,7 @@
<Project filename="jackd.cbp"> <Project filename="jackd.cbp">
<Depends filename="libjackserver.cbp" /> <Depends filename="libjackserver.cbp" />
</Project> </Project>
<Project filename="jack_portaudio.cbp" active="1">
<Project filename="jack_portaudio.cbp">
<Depends filename="libjackserver.cbp" /> <Depends filename="libjackserver.cbp" />
</Project> </Project>
<Project filename="jack_netdriver.cbp"> <Project filename="jack_netdriver.cbp">
@@ -56,7 +56,7 @@
<Project filename="multiple_metro.cbp"> <Project filename="multiple_metro.cbp">
<Depends filename="libjack.cbp" /> <Depends filename="libjack.cbp" />
</Project> </Project>
<Project filename="jack_winmme.cbp" />
<Project filename="jack_winmme.cbp" active="1" />
<Project filename="jack_loopback.cbp" /> <Project filename="jack_loopback.cbp" />
</Workspace> </Workspace>
</CodeBlocks_workspace_file> </CodeBlocks_workspace_file>

+ 28
- 11
windows/winmme/JackWinMMEDriver.cpp View File

@@ -52,6 +52,9 @@ JackWinMMEDriver::Attach()
latency_range.max = latency; latency_range.max = latency;
latency_range.min = latency; latency_range.min = latency;


jack_info("JackWinMMEDriver::Attach - fCaptureChannels %d", fCaptureChannels);
jack_info("JackWinMMEDriver::Attach - fPlaybackChannels %d", fPlaybackChannels);

// Inputs // Inputs
for (int i = 0; i < fCaptureChannels; i++) { for (int i = 0; i < fCaptureChannels; i++) {
JackWinMMEInputPort *input_port = input_ports[i]; JackWinMMEInputPort *input_port = input_ports[i];
@@ -130,9 +133,13 @@ JackWinMMEDriver::Open(bool capturing, bool playing, int in_channels,
{ {
const char *client_name = fClientControl.fName; const char *client_name = fClientControl.fName;
int input_count = 0; int input_count = 0;
int output_count = 0;
int num_potential_inputs = midiInGetNumDevs(); int num_potential_inputs = midiInGetNumDevs();
int num_potential_outputs = midiOutGetNumDevs(); int num_potential_outputs = midiOutGetNumDevs();
int output_count = 0;

jack_info("JackWinMMEDriver::Open - num_potential_inputs %d", num_potential_inputs);
jack_info("JackWinMMEDriver::Open - num_potential_outputs %d", num_potential_outputs);

if (num_potential_inputs) { if (num_potential_inputs) {
try { try {
input_ports = new JackWinMMEInputPort *[num_potential_inputs]; input_ports = new JackWinMMEInputPort *[num_potential_inputs];
@@ -175,6 +182,11 @@ JackWinMMEDriver::Open(bool capturing, bool playing, int in_channels,
output_count++; output_count++;
} }
} }

jack_info("JackWinMMEDriver::Open - input_count %d", input_count);
jack_info("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 "
"allocated."); "allocated.");
@@ -200,10 +212,25 @@ JackWinMMEDriver::Open(bool capturing, bool playing, int in_channels,
int int
JackWinMMEDriver::Read() JackWinMMEDriver::Read()
{ {

jack_nframes_t buffer_size = fEngineControl->fBufferSize; jack_nframes_t buffer_size = fEngineControl->fBufferSize;
for (int i = 0; i < fCaptureChannels; i++) { for (int i = 0; i < fCaptureChannels; i++) {
input_ports[i]->ProcessJack(GetInputBuffer(i), buffer_size); input_ports[i]->ProcessJack(GetInputBuffer(i), buffer_size);
} }

return 0;
}


int
JackWinMMEDriver::Write()
{
/*
jack_nframes_t buffer_size = fEngineControl->fBufferSize;
for (int i = 0; i < fPlaybackChannels; i++) {
output_ports[i]->ProcessJack(GetOutputBuffer(i), buffer_size);
}
*/
return 0; return 0;
} }


@@ -287,16 +314,6 @@ JackWinMMEDriver::Stop()
return result; return result;
} }


int
JackWinMMEDriver::Write()
{
jack_nframes_t buffer_size = fEngineControl->fBufferSize;
for (int i = 0; i < fPlaybackChannels; i++) {
output_ports[i]->ProcessJack(GetOutputBuffer(i), buffer_size);
}
return 0;
}

#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {


+ 6
- 6
windows/winmme/JackWinMMEInputPort.cpp View File

@@ -160,6 +160,12 @@ JackWinMMEInputPort::GetAlias()
return alias; return alias;
} }


const char *
JackWinMMEInputPort::GetName()
{
return name;
}

void void
JackWinMMEInputPort::GetErrorString(MMRESULT error, LPTSTR text) JackWinMMEInputPort::GetErrorString(MMRESULT error, LPTSTR text)
{ {
@@ -169,12 +175,6 @@ JackWinMMEInputPort::GetErrorString(MMRESULT error, LPTSTR text)
} }
} }


const char *
JackWinMMEInputPort::GetName()
{
return name;
}

void void
JackWinMMEInputPort::ProcessJack(JackMidiBuffer *port_buffer, JackWinMMEInputPort::ProcessJack(JackMidiBuffer *port_buffer,
jack_nframes_t frames) jack_nframes_t frames)


+ 4
- 2
windows/winmme/JackWinMMEInputPort.h View File

@@ -50,15 +50,17 @@ namespace Jack {
MMRESULT result); MMRESULT result);


char alias[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE]; char alias[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
char name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];

HMIDIIN handle; HMIDIIN handle;
jack_midi_event_t *jack_event; jack_midi_event_t *jack_event;
char name[JACK_CLIENT_NAME_SIZE + JACK_PORT_NAME_SIZE];
bool started;
jack_midi_data_t *sysex_buffer; jack_midi_data_t *sysex_buffer;
MIDIHDR sysex_header; MIDIHDR sysex_header;
JackMidiAsyncQueue *thread_queue; JackMidiAsyncQueue *thread_queue;
JackMidiBufferWriteQueue *write_queue; JackMidiBufferWriteQueue *write_queue;


bool started;

public: public:


JackWinMMEInputPort(const char *alias_name, const char *client_name, JackWinMMEInputPort(const char *alias_name, const char *client_name,


+ 9
- 0
windows/winmme/JackWinMMEOutputPort.cpp View File

@@ -129,9 +129,15 @@ bool
JackWinMMEOutputPort::Execute() JackWinMMEOutputPort::Execute()
{ {
for (;;) { for (;;) {
jack_log("JackWinMMEOutputPort::Execute TOTO");
JackSleep(100000);

if (! Wait(thread_queue_semaphore)) { if (! Wait(thread_queue_semaphore)) {
jack_log("JackWinMMEOutputPort::Execute BREAK");

break; break;
} }
/*
jack_midi_event_t *event = thread_queue->DequeueEvent(); jack_midi_event_t *event = thread_queue->DequeueEvent();
if (! event) { if (! event) {
break; break;
@@ -211,6 +217,7 @@ JackWinMMEOutputPort::Execute()
"midiOutUnprepareHeader", result); "midiOutUnprepareHeader", result);
break; break;
} }
*/
} }
stop_execution: stop_execution:
return false; return false;
@@ -364,6 +371,8 @@ JackWinMMEOutputPort::Stop()
bool bool
JackWinMMEOutputPort::Wait(HANDLE semaphore) JackWinMMEOutputPort::Wait(HANDLE semaphore)
{ {
jack_log("JackWinMMEOutputPort::Wait %d", semaphore);

DWORD result = WaitForSingleObject(semaphore, INFINITE); DWORD result = WaitForSingleObject(semaphore, INFINITE);
switch (result) { switch (result) {
case WAIT_FAILED: case WAIT_FAILED:


Loading…
Cancel
Save