Re: [linux-audio-dev] Re: Nicola Bernardini's sound file library comments

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

Subject: Re: [linux-audio-dev] Re: Nicola Bernardini's sound file library comments
From: Nicola Bernardini (nicb_AT_axnet.it)
Date: to elo    19 1999 - 12:09:35 EDT


Yesterday, Erik de Castro Lopo mi scrisse cio` che segue:

[snip]
> One of the things I have on my TODO list is to make libsndfile work
> so it can read and write pipes. Unfortunately, once one has started
> writing a large amount of data to a pipe it is not possible to fseek ()
> back to the beginning of the file and correct the header like one can
> with regular files. I see no way around this problem.

how does a pager like 'less' do? less can read infinitely large
files from a pipe and go back and forth. Or am I wrong?

[snip]
> I should mention that I had originally thought that operation on
> pipes was not necessary. I then received email from the LAME
> (http://www.sulaco.org/mp3/) mpeg 3 encoder project. They were
> using libsndfile when encoding files from disk and different code
> when reading a pipe. It turns out LAME can accept data piped out
> of a CD ripper. Working with pipes is now high on my list of
> priorities. When I get that working the LAME people will probably
> drop their own header parsing code.

any streaming operation will probably be wanting pipes...

[snip]
> I'm not really sure that something like this belongs in a library
> for reading and writing sound files. Being able to split a multichannel
> file and read samples from one channel at a time might be useful,
> but at the moment it is not high on my list of priorities. Being
> able to mix a number of channels down to mono or a stereo pair
> was not something I even envisioned. I think it would be difficult
> to make it general enough for even a large majority of the cases where
> mixing is done.

I agree with Erik. I think it is important to layer out things:
this library looks like the lower layer, possibly in parallel
with the audio hardware handling layer (which in Bill Schottstaedt's
libsnd are held in the same library, and after all it might not
be a bad idea). In order to keep things *simple* (which was one
of the requirements I had in the mail that exploded this thread),
I think that anything more complex than this belongs to an
upper layer. This does not mean that the end package has a number
of layers together: it's just a conceptual division, but it
helps a lot approaching the library and using it.

ciao

Nicola

------------------------------------------------------------------------
Nicola Bernardini
E-mail: nicb_AT_axnet.it
 
Re graphics: A picture is worth 10K words -- but only those to describe
the picture. Hardly any sets of 10K words can be adequately described
with pictures.


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

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:25:52 EST