0

我有一个安装了 jack-audio-connection-kit-1.9.9.5 的 gentoo amd64 Linux 系统。

我正在尝试使用以下代码获取可用插孔输入设备的列表:

#include <jack/jack.h>
#include <glib-2.0/glib.h>

const char **jack_get_input_devices() {

const char **ports;
const char *client_name = "tuxinstudio";
const char *server_name = NULL;
jack_options_t options = JackNoStartServer;
jack_status_t status;
jack_client_t *client;

client = jack_client_open(client_name,options,&status,server_name);
if (client == NULL) {
    g_debug("jack client open failed. status 0x%2.0x",status);                
}
if (status & JackServerStarted) {
    g_debug("JACK server started\n");
}
if (status & JackNameNotUnique) {
    client_name = jack_get_client_name(client);
    g_debug("unique name `%s' assigned\n", client_name);
}    
ports = jack_get_ports (client, NULL, NULL,JackPortIsPhysical|JackPortIsInput);
if (ports == NULL) {
    g_debug("no physical capture ports\n");
}    
g_print("sizeof ports: %lu",sizeof ports);
return ports;
}

杰克似乎无法连接到 dbus 服务器。

这是执行的输出:

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
jack_get_ports called with a NULL client

我该如何解决这个问题?

4

1 回答 1

0

问题出在 jackdbus 服务器上,我没有正确启动它。

我有一个火线声卡。所以现在我使用以下内容:

alsa_control start ds firewire

然后它能够​​正确连接到插孔。

于 2014-04-01T02:41:03.623 回答