Browse Source

Change naming scheme of 'alsarawmidi' ports for uniqueness when two MIDI interfaces with the same name are connected. Change 'alsarawmidi' ALSA port buffer size to 32 (lowest possible - it would be nice to make this lower) so that realtime MIDI messages can be sent ASAP when necessary.

tags/1.9.8
Devin Anderson 15 years ago
parent
commit
71d9f1ca2b
1 changed files with 13 additions and 2 deletions
  1. +13
    -2
      linux/alsarawmidi/JackALSARawMidiDriver.cpp

+ 13
- 2
linux/alsarawmidi/JackALSARawMidiDriver.cpp View File

@@ -54,6 +54,7 @@ JackALSARawMidiDriver::~JackALSARawMidiDriver()
int
JackALSARawMidiDriver::Attach()
{
const char *alias;
jack_nframes_t buffer_size = fEngineControl->fBufferSize;
jack_port_id_t index;
jack_nframes_t latency = buffer_size;
@@ -74,10 +75,15 @@ JackALSARawMidiDriver::Attach()
// X: Do we need to deallocate ports?
return -1;
}
alias = input_port->GetAlias();
port = fGraphManager->GetPort(index);
port->SetAlias(input_port->GetAlias());
port->SetAlias(alias);
port->SetLatencyRange(JackCaptureLatency, &latency_range);
fCapturePortList[i] = index;

jack_info("JackALSARawMidiDriver::Attach - input port registered "
"(name='%s', alias='%s').", name, alias);

}
if (! fEngineControl->fSyncMode) {
latency += buffer_size;
@@ -96,10 +102,15 @@ JackALSARawMidiDriver::Attach()
// X: Do we need to deallocate ports?
return -1;
}
alias = output_port->GetAlias();
port = fGraphManager->GetPort(index);
port->SetAlias(output_port->GetAlias());
port->SetAlias(alias);
port->SetLatencyRange(JackPlaybackLatency, &latency_range);
fPlaybackPortList[i] = index;

jack_info("JackALSARawMidiDriver::Attach - output port registered "
"(name='%s', alias='%s').", name, alias);

}
return 0;
}


Loading…
Cancel
Save