Re: [LAD] jack client autoconnection

From: Kjetil S. Matheussen <k.s.matheussen@email-addr-hidden>
Date: Mon Feb 04 2008 - 16:14:54 EET

On Mon, 4 Feb 2008, Bob Ham wrote:

> On Fri, 2008-02-01 at 19:34 +0100, Kjetil S. Matheussen wrote:
>
>> int jack_autoconnect_playback (jack_client_t *,
>> int portnum,
>> const char *source_port);
>> int jack_autoconnect_record (jack_client_t *,
>> int portnum,
>> const char *destination_port);
>>
>> The reason is that this API will make it easier
>> for programs to make autoconnection configurabe.
>> Autoconnecting the old way (which includes finding
>> the physical ports and/or checking environment variables
>> for ports to connect to, etc.) is a lot more
>> hassle than just calling the functions above.
>
> Even less hassle is for clients to do nothing at all and leave the whole
> business entirely for jackd. I suggest the following function instead:
>
> int jack_set_autoconnect(jack_client_t *, int autoconnect);
>
> This enables a control interface that can present the user with a simple
> system-wide toggle switch that would dictate whether or not ports are
> automatically connected.
>

I'm not sure what you mean by the last sentence.
Is the "autoconnect" variable either 0 or 1?

But how do libjack know the order of ports? By just
using creation order? Well, I guess that will work.

How about this interface then?

void jack_enable_autoconnect(jack_client_t *);
void jack_disable_autoconnect(jack_client_t *);

And then a typical playback client would work like this:

jack_client_t *client=...
jack_enable_autoconnect(client);
jack_port_t *out_port[0]=jack_port_register(client,...);
jack_port_t *out_port[1]=jack_port_register(client,...);
jack_disable_autoconnect(client);

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Mon Feb 4 20:15:01 2008

This archive was generated by hypermail 2.1.8 : Mon Feb 04 2008 - 20:15:01 EET