Responding to myself.
I got it to work by taking the example RawAudioFileComponent in the SDK and modifying it to accept kAudioFormatMPEGLayer3 and the extension "mp3".
Everything works now when I tell the test tools to use file format '*RAW' and data format '.mp3'.
Sorry to waste your time.
Mike
On May 5, 2006, at 3:47 PM, Mike Erickson wrote: I have written an audio codec component that uses lame to encode PCM to mp3. I have been using afconvert and ConvertFile from the samples in the SDK to test.
I can write the lame encoded data to the 'caff' file type using both test programs and the data is written and encoded correctly and QuickTime Player is able to properly play it back.
However, when I tell the test tools to write the encoded data to an 'MPG3' file type, the call in afconvert to AudioFileWritePackets fails with the error 'pck?'.
The call in ConvertFile to ExtAudioFileWrite fails with the same error. (I changed the build so it would use that API)
Does the system-supplied 'MPG3' AudioFile component support the writing of the '.mp3' data format, or, as I suspect, just the reading of '.mp3' data?
Do I need to write my own AudioFile component to write the encoded data?
Are magic cookies involved?
Mike
|