[linux-audio-dev] audioengine/laaga prototype now operational (audible)

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

Subject: [linux-audio-dev] audioengine/laaga prototype now operational (audible)
From: Paul Davis (pbd_AT_Op.Net)
Date: Mon Jun 18 2001 - 01:07:11 EEST


The latest snapshot (version bumped as requested by Juhana) now
contains support for one particular kind of in-process client (one
that is "part" of a driver). I also ported the full hw control
functionality for the hammerfall from the "ardour audioengine" as a
proof of concept.

The out-of-process client now functions as a simple "monitoring"
client, copying a single input port to a single output port. It
connects itself to two ports provided by the driver. I enclose a
sample of the code below.

   http://www.op.net/~pbd/audioengine-0.0.9.tar.gz

A little more work is needed to add support for non-driver-derived
internal clients (mostly just figuring out a way to determine their 3
callbacks and callback arguments after dlopen()).

There also seem to be problems with pthreads exiting. I will look into
this more aggressively when the rest is finished. If you try it out,
you may need to use "kill -9 lt-ae" to get rid of straggling
threads. sigh.

Your comments on the emerging design would be very welcome.

--p

int
process (nframes_t nframes, void *arg)

{
        sample_t *out = my_output_port->buffer;
        sample_t *in = my_input_port->buffer;
        memcpy (out, in, sizeof (sample_t) * nframes);
        return 0;
}

main ()

{
        if ((client = audioengine_open (argv[1], process, 0, bufsize, 0, srate, 0)) == 0) {
                fprintf (stderr, "audioengine server not running?\n");
                return 1;
        }

        my_input_port = audioengine_port_register (client, "myinput", AUDIOENGINE_DEFAULT_AUDIO_TYPE, PortIsInput, 0);
        my_output_port = audioengine_port_register (client, "myoutput", AUDIOENGINE_DEFAULT_AUDIO_TYPE, PortIsOutput, 0);

        if (audioengine_port_connect (client, "ALSA I/O:Input 1", "foo:myinput")) {
                fprintf (stderr, "cannot connect input ports\n");
        }

        if (audioengine_port_connect (client, "foo:myoutput", "ALSA I/O:Output 1")) {
                fprintf (stderr, "cannot connect output ports\n");
        }

        audioengine_activate (client);
}


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

This archive was generated by hypermail 2b28 : Mon Jun 18 2001 - 01:06:58 EEST