MP3 Packet Description Problem
MP3 Packet Description Problem
- Subject: MP3 Packet Description Problem
- From: Mike Simmons <email@hidden>
- Date: Tue, 26 Aug 2008 16:20:01 -0500
A year or more ago I wrote an app that captures Shoutcast MP3 streams, decodes the audio into linear PCM using AudioConverterFillComplexBuffer(), and writes the audio to disk. It was working fine on Mac OS X 10.4. On 10.5, however, AudioConverterFillComplexBuffer() returns a "pkd!" error indicating that I need to include an AudioStreamPacketDescription argument in the AudioConverterFillComplexBuffer() call, rather than passing a NULL pointer as I had been doing successfully on 10.4.
I've modified my input proc to set the AudioStreamPacketDescription with an mDataByteSize of 417 (the size of the MP3 packets), an mStartOffset of 0, and an mVariableFramesInPacket set to 0. The input proc is called repeatedly the first time AudioConverterFillComplexBuffer() is invoked, and it eventually causes an EXC_BAD_ACCESS error.
I saw Mattias Arrelid's posting regarding a similar problem, but I'm still kind of puzzled. The MP3 stream that I'm trying to decompress is a constant bit rate stream. I didn't need a packet description for it in the 10.4 version -- the converter input proc worked just fine. And I've seen other postings saying if a constant bit rate stream is being decoded an AudioStreamPacketDescription is not needed.
Can somebody shed some light on this for me please?
Thanks!
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