[linux-audio-dev] Channels and best practice

Hans Fugal hans at fugal.net
Tue Nov 15 13:56:38 UTC 2005


On Tue, 15 Nov 2005 at 07:24 -0500, Paul Davis wrote:
> On Tue, 2005-11-15 at 11:58 +0000, James McDermott wrote:
> > > What are your thoughts? What is best practice on multichannel audio, or
> > > is it always application-specific?
> > 
> > According to my experience and understanding:
> > 
> > -non-interleaved (multiple channels in separate arrays) is a bit
> > easier to code, but
> > -interleaved could give better performance (because the data you need
> > "now" is all close together in memory).
> > -libsndfile uses interleaved.
> > -plugins (DSSI, LADSPA) use separate arrays.
> 
> it depends whether playback + recording is the only goal, or editing is
> in the potential workflow. editing interleaved data, especially if there
> are unrelated signals in different channels that will be treated
> differently, is really, really hard. if all you do is playback and
> record, interleaved is marginally more efficient.

So marginally more efficient vs. really really hard, it sounds like for
a general-purpose lib you'd want seperate channels, eh?

-- 
Hans Fugal ; http://hans.fugal.net
 
There's nothing remarkable about it. All one has to do is hit the 
right keys at the right time and the instrument plays itself.
    -- Johann Sebastian Bach
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20051115/e892b3c2/attachment.pgp>


More information about the Linux-audio-dev mailing list