|
|
@@ -273,8 +273,7 @@ int JackAlsaDriver::Open(jack_nframes_t nframes, |
|
|
|
else if (strcmp(midi_driver_name, "raw") == 0) |
|
|
|
midi = alsa_rawmidi_new((jack_client_t*)this); |
|
|
|
|
|
|
|
if (JackServerGlobals::on_device_acquire != NULL) |
|
|
|
{ |
|
|
|
if (JackServerGlobals::on_device_acquire != NULL) { |
|
|
|
int capture_card = card_to_num(capture_driver_name); |
|
|
|
int playback_card = card_to_num(playback_driver_name); |
|
|
|
char audio_name[32]; |
|
|
@@ -282,12 +281,14 @@ int JackAlsaDriver::Open(jack_nframes_t nframes, |
|
|
|
snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", capture_card); |
|
|
|
if (!JackServerGlobals::on_device_acquire(audio_name)) { |
|
|
|
jack_error("Audio device %s cannot be acquired, trying to open it anyway...", capture_driver_name); |
|
|
|
return -1; |
|
|
|
} |
|
|
|
|
|
|
|
if (playback_card != capture_card) { |
|
|
|
snprintf(audio_name, sizeof(audio_name) - 1, "Audio%d", playback_card); |
|
|
|
if (!JackServerGlobals::on_device_acquire(audio_name)) { |
|
|
|
jack_error("Audio device %s cannot be acquired, trying to open it anyway...", playback_driver_name); |
|
|
|
return -1; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|