You can also just set the kAudioFileFlags_DontPageAlignAudioData flag when you create the file. The FLLR chunk is used to page-align the sample data (makes for more efficient I/O, since if the buffer and data are both aligned, the kernel can skip a copy and DMA directly into the prepared IO buffer, IIRC), so using the flag above causes it to inhibit this alignment, which in turn will inhibit the creation of the FLLR chunk.
kelly On Aug 9, 2011, at 4:24 AM, Iain McCowan wrote: Thanks Richard for the suggestion re mapping FLLR -> JUNK... I'll give this a try out of interest.
As a follow-up to my own post, I've since discovered that if I create the file using ExtAudioFile functions (which I like due to the built-in format converters), I get a wave file which is exactly what I want except it has the FLLR chunk.
If I then read that wave file as a QTMovie object and then call writeToFile: on the QTMovie, it creates the same file without the FLLR chunk. Which is what I want.
So I have a hacky workaround solution (hacky as this behaviour is discovered by observation not documentation), but I'd rather do it all in the one ExtAudioFile process. Doing it all instead in QTKit is not really a good option - QTKit documentation and mechanisms are a nightmare for attempting to do simple format conversions on audio-only files.
On Tue, Aug 9, 2011 at 8:57 PM, Richard Dobson <email@hidden> wrote:
On 09/08/2011 04:28, Iain McCowan wrote:
Hello,
I use the ExtAudioFile API to create and manipulate wave files.
I am having an issue integrating with a third-party software that does
not correctly parse the .wav files produced using the ExtAudio functions.
The problem has been isolated to the FLLR chunk that the Apple library
adds to align the data.
I was under the impression the FLLR chunk was an Apple invention and confined to AIFF files. There already exist defined 'JUNK' and 'PAD ' chunks (at least) for the WAVE format. One of them would really be enough. Is FLLR publicly documented anywhere? Assuming ExtAudioFile does implement the chunk correctly, and it is as vanilla as a "JUNK" chunk is, worst case you could try, as an experiment, editing the file in a hex editor and renaming the chunk to JUNK and see what happens!
And, I might add - if the 4K alignment is ~so~ important that ExtAudioFile seemingly imposes it on users silently, with no facility to avoid it, how on earth does OS X manage to play plain old non-aligned WAVE files (which must be the majority) without complaint or obvious loss of performance?
Richard Dobson
_______________________________________________
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
|