• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: paramErr from AudioConverterFillComplexBuffer with MP3 source
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: paramErr from AudioConverterFillComplexBuffer with MP3 source


  • Subject: Re: paramErr from AudioConverterFillComplexBuffer with MP3 source
  • From: James McCartney <email@hidden>
  • Date: Wed, 12 Apr 2006 10:40:50 -0700


Here are some things that can cause a paramErr from the decoder:

Your input format has a non-zero mBytesPerPacket and in your input proc you are passing in a buffer list where mDataByteSize != ioNumberFrames * mBytesPerPacket. It is safer to assume that MP3 is not CBR and pass zero for mBytesPerPacket.

Your buffer list mNumberBuffers does not equal 1 for interleaved or compressed formats.

The codec is returning a paramErr. You could be passing in bad data or bad packet boundaries.

The first thing I would do is not assume that you have CBR MP3 and make sure the packets you are passing in are starting where you think they are.

Why don't you use ExtAudioFile which will read an MP3 file and decode it to PCM for you?

On Apr 11, 2006, at 6:20 PM, Stevo Brock wrote:

Hello,

I have processed a TON of MP3 files through AudioConverterFillComplexBuffer with no issues. However, I have just discovered 3 files that are causing a paramErr right at the very end of processing the audio.

The input format is MP3 (CBR), 16, 44.1kHz, stereo, 2304 samples per packet, 418 bytes per packet, 836 bytes per frame
The output format is PCM (Floating point), 32, 44.1Khz, stereo, 1 sample per packet, 8 bytes per packet, 8 bytes per frame


Everything seems to be working properly. Each iteration I'm asking for 1024 packets from AudioConverterFillComplexBuffer() and getting 1024 packets back, with return code of noErr. Periodically my MP3 reader is called and returns packets (in this case, 10 packets of 836 bytes each). At the end, the MP3 reader returns 6 packets, then finally 0 packets. Then after about 20 more calls, ACFCB() returns only 512 packets and paramErr. Ignoring this and continuing, the next call returns 0 packets. Most files have a similar flow, but don't generate a paramErr. I'm seeing this on 10.3.9/QT 6.5.2 and 10.4.6/QT 7.0.4

How can I discover what is causing the paramErr?

-Stevo Brock
 Monkey Tools
 www.monkey-tools.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com


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
  • Follow-Ups:
    • Re: paramErr from AudioConverterFillComplexBuffer with MP3 source
      • From: Stevo Brock <email@hidden>
References: 
 >paramErr from AudioConverterFillComplexBuffer with MP3 source (From: Stevo Brock <email@hidden>)

  • Prev by Date: AU automation questions
  • Next by Date: Re: Coreaudio-api Digest, Vol 3, Issue 116
  • Previous by thread: paramErr from AudioConverterFillComplexBuffer with MP3 source
  • Next by thread: Re: paramErr from AudioConverterFillComplexBuffer with MP3 source
  • Index(es):
    • Date
    • Thread