Re: writing m4a problems continued
Re: writing m4a problems continued
- Subject: Re: writing m4a problems continued
- From: Simon Liu <email@hidden>
- Date: Mon, 20 Jun 2005 15:06:04 +0100
Hi Doug & John,
Did you manage to resolve error 0xFFFFFFF8, or -8, from
AudioFileWritePackets? I am converting 2-ch Float32PCM to AAC, with
filetype of kAudioFileM4AType, and I am also getting this error.
Things seem okay as each invocation of
AudioConverterFillComplexBuffer() returns noErr, and the
AudioStreamPacketDescription is filled out. When invoking
AudioFileWritePackets, I start sequentially from 0. Not sure why -8
error is returned...
I believe my input and output ABSDs and AudioFile are setup correctly
(they work when converting with ExtFileAudio).
Two things which may or may not be relevant are:
- I do not set a magic compression cookie
- I have set AudioConverterFillComplexBuffer()'s AudioBufferList
*outOutputData to: 1 buffer, interleaved, 2 channel. (Aside: It
doesn't make sense to have a non-interleaved buffer list for
compressed packet data, right?)
I've attached some debug output which might help (PR means Packets Rendered):
AudioConverter 0x280a614 [0x50f460]:
CodecConverter 0x510d80
Input: 2 ch, 44100 Hz, 'lpcm' (0x0000000B) 32-bit big-endian float
Output: 2 ch, 44100 Hz, 'aac ' (0x00000002) 0 bits/channel, 0
bytes/packet, 1024 frames/packet, 0 bytes/frame
AudioConverterFillComplexBuffer: inputPR = 349184, outputPR = 341,
outputByteSize=127016
AudioFileWrite status = -8
AudioConverterFillComplexBuffer: inputPR = 349184, outputPR = 341,
outputByteSize=126853
AudioFileWrite status = -8
AudioConverterFillComplexBuffer: inputPR = 349184, outputPR = 341,
outputByteSize=126200
AudioFileWrite status = -8
AudioConverterFillComplexBuffer: inputPR = 240640, outputPR = 235,
outputByteSize=88001
AudioFileWrite status = -8
EOF
---
Regards,
Simon
On 5/7/05, john <email@hidden> wrote:
> Hi Doug,
>
> It errors at every call to AudioFileWritePackets(). I do start with packet
> 0. Also, I have the code setup to increment the packetWritePosition based on
> the number of packets that have been written, like the CAAudioFile code.
>
> Not sure if this means anything, but the first conversion from
> AudioConverterFillComplexBuffer() returns 7 bytes, then
> things pick up to 379 (app.) and continue at about that rate. The error
> stays the same, regardless.
>
> Thanks!
>
> -- John
>
>
>
>
> John,
>
> That looks like an error code from the MP4 audio file component ... hm, a
> MP4DataInformationAtom has a nil dataReference atom pointer.
>
> When writing .mp4/.m4a, the component requires that you start with packet 0
> and write packets sequentially from there. What packet number are you
> writing when this fails? What packet numbers have you written previously?
>
> Doug
>
> _______________________________________________
> 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