Chris,
Yes, I can change the callback function as you suggest. However, my app does not
know in advance how the AAC file was encoded ( e.g. the sampling rate).
My understanding that the AAC file starts with a header that describes the format of
the rest of the audio data and this header needs to be parsed and mapped into an
ASBD. I know that the Audio File services API does this - is there any other API that
can do the same thing but from an NSData object rather than by reading an actual file?
I would like to avoid having to write code to parse the header of the AAC file myself.
Also, I guess the audio bytes start after this header, So I need to know the size of this
header so that I can skip past it to get to the audio data.
Once those two problems (getting the ASBD and figuring out how many bytes to skip
over), are out of the way, I can do as you say and read out the rest of the audio bytes
in my callback function.
Also, you mentioned using Audio Queue for conversions - I haven't used Audio Queue
myself, but I can go and look it up. However, I presume that the Audio Queue APIs also
need an ASBD so wouldn't I run into the same problem - how to generate an ASBD and
how to know how many bytes of header to skip over.
Richard