Re: [linux-audio-dev] a port/buffer proposal

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

Subject: Re: [linux-audio-dev] a port/buffer proposal
From: Richard Guenther (rguenth_AT_tat.physik.uni-tuebingen.de)
Date: Tue May 22 2001 - 15:17:26 EEST


Reading the on-line archives of lad, I think I need to tell
something about the GLAME way of doing buffer management.

The basic model is that we have explicit representation of
ports and pipes (which are your connections). A port generally
can be connected with multiple pipes, but there is no feature
like "automagically" mixing - this has to be done explicitly.
Note that the difference in the GLAME model is, that you do
not have left/right/whatever ports, but just one sample in port
to which you connect left/right/whatever streams as seperate
pipes.

(Automatic) zerocopy operation is ensured by prepending a buffer
with a buffer head that does reference counting. So we can pass
(associate a buffer with a pipe) one buffer to multiple pipes
by reference without copying, just by bumping the reference
count.

Now there are two ways to "operate" on those buffers:
- work in-place: you have to call make_buffer_private() on the
  buffer which does copy the buffer if and if only the reference
  count is not 1
- dont work in-place: you may just read from the input buffer
  and write to the output buffer (which you have to allocate
  yourself in GLAME - there is no such thing like a host)

So all your special casing can be avoided by providing reference
counting and some rules (make_buffer_private() before any write).

Note that I dont think things like automatic mixing are actually
useful to support in the "backend" - those are really user interface
issues (dont clobber networks with lots of mixes / splits - in GLAME
we have a mix plugin and a one2n plugin).

Richard.

PS: cc me, if you have more questions, I'm not on the list.

--
Richard Guenther <richard.guenther_AT_uni-tuebingen.de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/
The GLAME Project: http://www.glame.de/


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

This archive was generated by hypermail 2b28 : Tue May 22 2001 - 15:53:48 EEST