Re: [a little OT] File format for a bunch of floats
Re: [a little OT] File format for a bunch of floats
- Subject: Re: [a little OT] File format for a bunch of floats
- From: William Stewart <email@hidden>
- Date: Wed, 22 Sep 2010 10:09:53 -0700
You can store floats in a CAF file.
We ship an example audio file component called a RawAudioFile - it just treats any file on disk as a 16bit file. You could tweak that to treat the files as 32bit float, then use afconvert to convert those raw files to CAF files. Should be pretty straight forward to do that. Any app that uses the AudioFile API would also be able to see your files with this file component installed.
Bill
On Sep 22, 2010, at 3:30 AM, Jerry wrote:
>
> On Sep 22, 2010, at 3:24 AM, Jerry wrote:
>
>> I have a _lot_ of audio files that have been generated by unusual means. They are 32-bit little endian floating point, one channel, with no header. I suppose this is some form of "raw." It's just a bunch of floats, all audio.
>>
>> I would like to be able to have them play by e.g. invoking QuickLook on them or other similar means such as within DEVONthink. I don't want to modify the file unless I absolutely have to, and then only by automatic means (no manually opening in an editor and saving in another format.
>>
>> I'm pretty sure this is a stupid question, but is there some file extension that I can add that will make the OS recognize them correctly?
>>
>> My fallback is to save one file as AIFF and see how much bigger the AIFF is than the raw--that is the header size and it is at the beginning. I can read out that number of bytes and stuff them in to the front of my file before I write out the floats, then add .aiff to the file name. I recall having done this in the past (manually, for a small number of files) and it worked for all similar AIFF files regardless of lengths.
>>
>> I know this isn't really a CoreAudio question but what better place to ask. 8^)
>>
>> On a related note, I used to have an OS9 utility that would tell me the header length of AIFF files. Is there a tool around that does this? Command line?
>>
>> Thanks,
>> Lance
>
> Responding to my own post...
> Is there a command line tool that I can use to convert this file format into another, more "OS-friendly," format? I'm on 10.5.
> Jerry
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden