Re: [linux-audio-dev] LAAGA proposal, part ??

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] LAAGA proposal, part ??
From: Simon Per Soren Kagedal (simon_AT_cs.uoregon.edu)
Date: Fri Jun 08 2001 - 01:47:12 EEST


Hi Paul, others,

I have some questions about this API. First, of more generic kind:

Is the intention to create a One Audioengine implementation, with
accompanying client library, or is it just a specification of an API
that can have many implementations in the end?

And, on the topic of MP and SP, you say in another message:

> However, we need to support out-of-process too since it will work even
> for <3msec latencies in almost every case. Thats why the audioengine
> API I am in the midst of proposing is independent of whether or not
> the "client/plugin" is in-process or out-of-process, though I have to
> admit to a bias toward out-of-process right now, since it solves many
> problems without introducing many new ones.

How does the in-process case work? I assume there would be some
plugin_init() function to look for in the shared object that is not
specified yet. But then what happens? Looking at main..

> main ()
>
> {
> audioengine_open ("myname", process, bufsize, srate);
>
> printf ("connected to the audioengine, sample rate = %u, maximum buffer size = %u\n",
> audioengine_get_sample_rate(),
> audioengine_get_buffer_size ());
>
> my_input_port = audioengine_port_register
> ("input", AUDIOENGINE_DEFAULT_AUDIO_TYPE, PortIsInput);
> my_output_port = audioengine_port_register
> ("output", AUDIOENGINE_DEFAULT_AUDIO_TYPE, PortIsOutput);
>
> /* create gui */
> /* run gui */
> }

...this doesn't look like something a plugin would do, more like:

plugin_init (audioengine_t *audioengine)
{
        audioengine->open (audioengine, "myname", ....

        audioengine->this, audioengine->that

        /* and so on... */
}

Otherwise I don't understand how it's working. How would a regular
audioengine_open (client_name, ...) know if it's in process or if
we're supposed to connect to a server etc..?

(Sorry if discussing this kind of details is not what you want to do at
this stage, but the API was specified at this level of detail (C
code)..)

And, for the MP case... Is the specific IPC technique used not
relevant to the API, do you say? How does that work? I mean, say
that named FIFOs are used for sync (shm for the actual data). Then,
as it looks like from main() here above, audioengine_open needs to
pretty much create its own thread to wait for an fd, is that right?

Other possibilities would be:

* provide a way for the audioengine client side to hook up to your own
  main loop
* have a audioengine_main () that the user can put in its own thread if
  he wants to

> some_list_type_t *audioengine_get_ports (const char *port_name_pattern,
> const char *type_name_pattern,
> unsigned long flags);

What kind of regex would be used? Actually, is that necessary... Why
not just return all the ports and let the user program filter as
necessary? Hmmm. I like the flags matching though, so a program can
choose default output port as

audioengine_get_ports (NULL, NULL, PortIsOutput | PortIsPhysical)

and hope to at least get some noise through speakers. :)

Just some thoughts and things I was curious about.

Simon.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Jun 08 2001 - 03:30:36 EEST