[Ardour-Users] [Ardour-Dev] libsndfile

John Emmas johne53 at tiscali.co.uk
Sat May 10 09:27:21 PDT 2008


----- Original Message ----- 
From: "John Emmas" <johne53 at tiscali.co.uk>
Subject: Re: [Ardour-Users] [Ardour-Dev] libsndfile
>
> For raw data though, automatic byte swapping isn't yet implemented in our
> (current) version of libsndfile.
>
Oops - I should learn to read what I write!!  *Automatic* byte swapping of
raw data isn't implemented, even in the current version (it can't possibly
be implemented automatically, since only the programmer knows what type of
data he's dealing with).  However, at least you can now ascertain whether
byte swapping is required or not - which is the bit that wasn't implemented
previously.

John


----- Original Message ----- 
From: "John Emmas" <johne53 at tiscali.co.uk>
To: <ardour-users at lists.ardour.org>; "Ardour-dev"
<ardour-dev at lists.ardour.org>
Sent: 10 May 2008 15:27
Subject: Re: [Ardour-Users] [Ardour-Dev] libsndfile


> 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 ...
>>
>
> _______________________________________________
> Ardour-Users mailing list
> ardour-users at lists.ardour.org
> http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org




More information about the Ardour-Users mailing list