[Ardour-Users] [Ardour-Dev] libsndfile
John Emmas
johne53 at tiscali.co.uk
Sat May 10 08:27:38 PDT 2008
Hi Paul,
My understanding (from what Erik told me about a year ago) is that while
libsndfile can handle 3 bytes per sample on the 'file' side, it can't handle
it as an 'in memory' format. His recommendation was that I should convert
AAF's 3 bytes per sample into what he called an array of 'normalized
floats'. libsndfile could then take an array of float and save the data as
24-bit audio. Other ways would include converting to 32-bit int or just
writing raw data. In fact, looking at the code, it looks as if it's Ardour
that internalizes to float, not libsndfile (at least, it looks that way in
libs/ardour/sndfilesource.cc).
Float is a possibility (though not Erik's suggestion of 'normalized'
floats). However, int is now looking like the favoured way forward because
libsndfile would still take care of byte swapping. For raw data though,
automatic byte swapping isn't yet implemented in our (current) version
of libsndfile.
John
----- Original Message -----
From: "Paul Davis" <paul at linuxaudiosystems.com>
To: "John Emmas" <johne53 at tiscali.co.uk>
Cc: <ardour-users at lists.ardour.org>; "Ardour-dev"
<ardour-dev at lists.ardour.org>
Sent: 10 May 2008 13:49
Subject: Re: [Ardour-Dev] libsndfile
>
> On Sat, 2008-05-10 at 11:13 +0000, John Emmas wrote:
>> Hi everyone,
>>
>> I need to do some work to 'harmonize' 24-bit audio between AAF and Ardour
>> (prior to releasing an AAF importer for Ardour). One problem is that AAF
>> implements a special 24-bit data type (i.e. 3 bytes per sample) whereas
>> libsndfile internalizes 24-bit audio to 32-bit floats.
>
> this isn't true john. ardour uses libsndfile specifically to write
> either 32 bit float format or 24 bit integer format. it can do either
> (and a lot more besides). what makes you believe that it always
> "internalizes" to float? libsndfile does what its calling application
> asks it to ...
>
> in ardour, see the Options menu item, which allows you to switch sample
> data formats ...
>
More information about the Ardour-Users
mailing list