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