Subject: [linux-audio-dev] libsndfile (was Sample conversion tools)
From: Erik de Castro Lopo (erikd-lad_AT_mega-nerd.com)
Date: Tue Jun 04 2002 - 11:45:25 EEST
On Mon, 03 Jun 2002 21:01:14 -0400
Paul Davis <pbd_AT_op.net> wrote:
> i'm a huge fan of libsndfile (its so much better than the SGI inspired
> API that does the same thing).
Thanks for the very positive feedback :-).
> but to be honest, sampler patches aren't in libsndfile's domain.
That doesn't mean it always has to be that way. I think there definitely
is a cross over.
On 04 Jun 2002 01:04:55 -0600
Josh Green <jgreen_AT_users.sourceforge.net> wrote:
> Does libsndfile have sample conversion routines yet? That is the one
> thing I like about libaudiofile. You can set a virtual format and this
> would be converted to/from when loading/saving samples.
What exactly do you mean by this? libsndfile allows you to open a 16 bit
PCM WAV file and read the data as short, int, float or double depending
on whether you call
sf_read_short()
sf_read_int()
sf_read_float() or
sf_read_double()
If you open a file for writing and specify that the destination file be
16 bit PCM data you can use any of the sf_write_XXXX functions.
Scaling and endian conversion etc takes place automatically on the fly.
This has been a feature of libsndfile since the very first released version.
> This is currently handled (at least for SoundFonts) with libsoundfont. I
> would like to extend this to DLS though, without attempting to unify the
> API.
This is indeed a noble goal.
Erik
-
+-----------------------------------------------------------+
Erik de Castro Lopo nospam_AT_mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"We can build a better product than Linux" -- Microsoft
Corp.'s Windows operating-system chief, Jim Allchin.
One has to wonder why, with their huge resources, they haven't.
This archive was generated by hypermail 2b28 : Tue Jun 04 2002 - 11:36:55 EEST