Correct rd_acquire.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4395 0c269be4-1314-0410-8aa9-9f06e86f4224
This commit is contained in:
parent
00fc09b3b8
commit
90494cc885
|
@ -369,8 +369,7 @@ int rd_acquire(
|
|||
DBusError _error;
|
||||
DBusMessage *m = NULL, *reply = NULL;
|
||||
dbus_bool_t good;
|
||||
|
||||
vtable.message_function = object_handler;
|
||||
vtable.message_function = object_handler;
|
||||
|
||||
if (!error)
|
||||
error = &_error;
|
||||
|
@ -430,7 +429,7 @@ int rd_acquire(
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if (k == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
|
||||
if (k == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER || k == DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER)
|
||||
goto success;
|
||||
|
||||
if (k != DBUS_REQUEST_NAME_REPLY_EXISTS) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue