• 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: AudioConverterFillComplexBuffer stops being called when data starved
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioConverterFillComplexBuffer stops being called when data starved


  • Subject: Re: AudioConverterFillComplexBuffer stops being called when data starved
  • From: Jeff Moore <email@hidden>
  • Date: Wed, 20 Jun 2007 11:14:47 -0700

By returning no error and 0 packets of data, you are signaling to the AudioConverter that you are at the end of the stream and that it should not call the input proc for more data. To get out of this state, you need to call AudioConverterReset().

If, however, this is not the true end of the stream but you don't have any more data to convert, then you need to return from your input proc 0 packets of data and some error code. The specific error code you return doesn't matter just so long as it is not 0. This error will in turn be returned to you as the return value of AudioConverterFillComplexData and the next time you call AudioConverterFillComplexData, your input proc will get called again.

On Jun 20, 2007, at 10:50 AM, mike woodworth wrote:

I'm finally making the sort of progress in core audio that results in actual sounds coming out of my speakers - a big encouragement to keep pressing on! However, I've run into a problem with audioconverters I'm hoping someone can help me answer.

I have a default output with a input Proc that in turn calls AudioConverterFillComplexBuffer() to get the setup audioconverter to convert more data and return it. This is working fine, until the first time my incoming buffer of compressed data gets completely emptied. At this point, I return noErr and 0 packets from the AudioConverterComplexInputDataProc callback. From then on, my render callback continues calling AudioConverterFillComplexBuffer(), but this in turn no longer calls my AudioConverterComplexInputDataProc callback for additional data.

What am I doing wrong? Do I need to reset something in the converter after a stall like this? Should I be returning something other than noErr from the callback?

--

Jeff Moore
Core Audio
Apple


_______________________________________________ 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
References: 
 >AudioConverterFillComplexBuffer stops being called when data starved (From: mike woodworth <email@hidden>)

  • Prev by Date: AudioConverterFillComplexBuffer stops being called when data starved
  • Next by Date: Re: Multi Channel FFT Audio Anaylzer
  • Previous by thread: AudioConverterFillComplexBuffer stops being called when data starved
  • Next by thread: Listening To kAudioDeviceProcessorOverload From AudioUnit
  • Index(es):
    • Date
    • Thread