Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: FLLR (compression ?) in AIFF file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FLLR (compression ?) in AIFF file



2008/8/6 Brian Willoughby <email@hidden>:
> If you're having trouble reading AIFF with your own code, then perhaps you
> should use the Apple AudioFIle and ExtAudioFile API.  A proper file parsing
> API should help a great deal, and Apple's will translate from 16-bit fixed
> to 32-bit float for you.  There may be 3rd-party AIFF libraries, too.
>
> By the way, AIFF never stores float.  AIFC can store float, but only with
> certain compression types.
>
> Brian Willoughby
> Sound Consulting
>
>
> On Aug 6, 2008, at 12:28, Francois Baronnet wrote:
>>>
>>> Ok, thanks. As I'm the recorder of the sound and then there is only me
>>> to analyse it (then the sound file is deleted), I thing I can use
>>> uncompressed AIFF, no?
>>>
>>> Please correct me if I go wrong, but if I move to the SSND chunk, I
>>> should find very closed to it the "sound data", shouldn't I?
>>> And these data must be of type float, from -1.000 to 1.000, right? If
>>> it's true, then I don't understand why I'm getting stange numbers
>>> (xxx.xx E-41 for example).
>>>
>>> Here is a screenshot of my file opened with some hexadecimal editor.
>>> My app is reading from 00 22 00 00 until the end of file.
>>> http://cpcstats.free.fr/upload/files/1218044603_Image_1.png
>>>
>>> May be it's not float? May be the offset isn't good? I tried many
>>> combinations but I can't get one "good" float value...
>>
> Oooops...
>
> Now I'm reading my data (16 bit float) 2 bytes by 2 bytes (first 30
> 000) and I'm getting all values between -1.999 and -1.991.
>
>  float value;
>  int i=0;
>  do
>  {
>   [[theFileHandle readDataOfLength: 2] getBytes: &value];
>   NSLog(@"%f",value);
>   chunkSize -= 2;
>  i++;
>  }while(chunkSize > 0 && i < 30000);
>
>
> I haven't plot my values but I'm pretty sure it won't look like a nice
> wave as I can see in Audacity...
>
>
> --
> François Baronnet
>
>

Ok. I was in complete misunderstanding since the beginning: you can't
open AIFF file "like that" and draw its wave "like that".
I just started reading ExtAudio on apple web site and I'm kinda puzzle
by the lack of "tutorials". I found one for recording my AIFF file but
no more.
May be I should record audio in WAVE format (seems easier to read)? I
hope it's supported by CoreAudio (I can see kAudioFileWaveType).

--
François Baronnet
 _______________________________________________
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

References: 
 >FLLR (compression ?) in AIFF file (From: "Francois Baronnet" <email@hidden>)
 >Re: FLLR (compression ?) in AIFF file (From: Stephen Davis <email@hidden>)
 >Re: FLLR (compression ?) in AIFF file (From: Richard Dobson <email@hidden>)
 >Re: FLLR (compression ?) in AIFF file (From: "Francois Baronnet" <email@hidden>)
 >Re: FLLR (compression ?) in AIFF file (From: Stephen Davis <email@hidden>)
 >Re: FLLR (compression ?) in AIFF file (From: "Francois Baronnet" <email@hidden>)
 >Re: FLLR (compression ?) in AIFF file (From: Brian Willoughby <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.