Re: [Jack-Devel] jack1 version jack2 public headers comparison

PrevNext  Index
DateMon, 27 Feb 2012 13:18:41 -0500
From Paul Davis <[hidden] at linuxaudiosystems dot com>
ToDevin Anderson <[hidden] at gmail dot com>
CcJACK <[hidden] at lists dot jackaudio dot org>
In-Reply-ToDevin Anderson Re: [Jack-Devel] jack1 version jack2 public headers comparison
On Mon, Feb 27, 2012 at 1:00 PM, Devin Anderson
<[hidden]> wrote:
> On Mon, Feb 27, 2012 at 1:16 AM,  <[hidden]> wrote:
>> On Sat, Feb 25, 2012 at 02:29:34PM -0800, Devin Anderson wrote:
>>> On Fri, Feb 24, 2012 at 9:44 AM, Stéphane Letz <[hidden]> wrote:
>>>
>>> > Le 24 févr. 2012 à 17:41, Paul Davis a écrit :
>>> >
>>> >>> Reworked :
>>> >>> ==========
>>> >>>
>>> >>> jackctl_server_start/jackctl_server_close reworked in a
>>> >>> jackctl_server_open/jackctl_server_start/jackctl_server_stop/jackctl_server_close
>>> >>
>>> >> seems reasonable, though what's the justification?
>>> >
>>> >
>>> > (Not completely sure anymore), but I think it was related to
>>> > slave backend management when Devin Anderson did the MIDI
>>> > backend rewrite in JACK2. This open/start/stop/close scheme
>>> > was a better way to separated the steps.
>>>
>>> See the last four comments on this ticket:
>>>
>>>     http://trac.jackaudio.org/ticket/219
>>
>> i fail to understand, why this justifies this splitup.
>> it seems that, in order to add slave drivers, the server needs to be
>> opened ?
>
> IIRC, 'jackctl_server_open' instantiates the master audio driver.
> Calls to 'jackctl_server_add_slave' instantiate slave drivers, each of
> which is added to the master driver.
>
>> and because the implementation is lacking support for adding slaves
>> while the server is running, you need to add them in between.
>>
>> the implementation in jack1 is equally bad. we even lack the controlapi
>> bits. however... i dont see why we cant just save a proper list of slave
>> drivers in the jackctl_server_t which are then instantiated during
>> server start.
>
> AFAIK, there isn't really a reason, save that some of the internal
> structures would have to be changed in JACK 2.
>
> However, that doesn't mean your idea is necessarily better.  There
> would still need to be functionality to add and remove the master
> driver.  You could make the case that the calls could be renamed to
> 'jackctl_server_add_master' and 'jackctl_server_remove_master'.  Since
> the server requires a master driver to run, I think that the
> 'jackctl_server_open' and 'jackctl_server_close' names are just fine.

torben, nedko and i discussed this on IRC a few hours ago.

there are two separate questions getting tangled up.

one question is whether or not dynamic reconfiguration of the server
is explicit (stop; reconfigure; start) or implicit (reconfigure). my
impression right now is that no implementation of JACK supports
dynamic reconfiguration in any way except the buffer size. correct me
if i'm wrong. if it is explicit, then i see virtue in a separate
function that "stops the master driver".

another question is whether we are trying to hide the fact that
primary role of the control API is to setup a server configuration,
and then launch that configuration. if we're not trying to hide it,
then presumably the API should just be (in OOP terms)

   server = server_create();
   server->set_parameter (...);
   server->set_parameter (...);
   ...
   server->start ();

the parameters include the master driver and 0...N slave drivers.
PrevNext  Index

1330366738.7303_0.ltw:2,a <CAFa_cKkFTBOGpusD78JDdN+GXYfBqfoVzxRh0WfRH48QMhUgRQ at mail dot gmail dot com>