Re: AudioCodec, AudioFileWritePackets, and pck?
Re: AudioCodec, AudioFileWritePackets, and pck?
- Subject: Re: AudioCodec, AudioFileWritePackets, and pck?
- From: William Stewart <email@hidden>
- Date: Fri, 5 May 2006 16:44:12 -0700
Mike
The fact that this is already working with CAF files suggests to me
that you are pretty much there. The list of file types supported are
provided by API in AudioToolbox/AudioFile.h (and we have built in
types for the files we natively support).
The MPG3 is:
kAudioFileMP3Type = 'MPG3',
The data type we are expecting for these are from CoreAudio/
CoreAudioTypes.h:
kAudioFormatMPEGLayer3 = '.mp3'
The 'RAW ' File component is really not the best solution - This
implies to me that there is something wrong with the packets you are
supplying from your encoder. There are a few places where this error
is returned, so its hard to tell from your info what the problem is.
It would be easiest if we could get a build of your encoder to test
with - I don't see any reason why you shouldn't be able to use the
MP3 file code to write MP3 files with your encoder.
Thanks
Bill
On 05/05/2006, at 2:05 PM, Mike Erickson wrote:
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
_______________________________________________
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
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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