jack: register ports before activating clients
Call jack_port_register() before jack_activate().
This commit is contained in:
parent
9ef6c79991
commit
bbf0453709
@ -227,11 +227,6 @@ mpd_jack_connect(struct jack_data *jd, struct audio_format *audio_format)
|
|||||||
jack_set_sample_rate_callback(jd->client, mpd_jack_srate, jd);
|
jack_set_sample_rate_callback(jd->client, mpd_jack_srate, jd);
|
||||||
jack_on_shutdown(jd->client, mpd_jack_shutdown, jd);
|
jack_on_shutdown(jd->client, mpd_jack_shutdown, jd);
|
||||||
|
|
||||||
if ( jack_activate(jd->client) ) {
|
|
||||||
g_warning("cannot activate client");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
jd->ports[0] = jack_port_register(jd->client, "left",
|
jd->ports[0] = jack_port_register(jd->client, "left",
|
||||||
JACK_DEFAULT_AUDIO_TYPE,
|
JACK_DEFAULT_AUDIO_TYPE,
|
||||||
JackPortIsOutput, 0);
|
JackPortIsOutput, 0);
|
||||||
@ -248,6 +243,11 @@ mpd_jack_connect(struct jack_data *jd, struct audio_format *audio_format)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( jack_activate(jd->client) ) {
|
||||||
|
g_warning("cannot activate client");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* hay que buscar que hay */
|
/* hay que buscar que hay */
|
||||||
if (!jd->output_ports[1] &&
|
if (!jd->output_ports[1] &&
|
||||||
(jports = jack_get_ports(jd->client, NULL, NULL,
|
(jports = jack_get_ports(jd->client, NULL, NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user