• 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: ExtAudioFileRead ioNumberFrames parameter can only be adjusted downward?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ExtAudioFileRead ioNumberFrames parameter can only be adjusted downward?


  • Subject: Re: ExtAudioFileRead ioNumberFrames parameter can only be adjusted downward?
  • From: patrick machielse <email@hidden>
  • Date: Wed, 28 Sep 2011 17:06:56 +0200

Op 23 sep. 2011, om 23:55 heeft Doug Wyatt het volgende geschreven:

> Be sure that before each call to ExtAudioFileRead you are setting each mDataByteSize in the AudioBufferList to be consistent with the number of frames you are requesting. The read will be limited to the smaller of the number of frames requested and the capacity of the buffer as expressed in mDataByteSize.

Aha! Yes, that helped. Thanks!

Reading the documentation again:

    "On output, the number of frames actually read. Fewer frames may be read than were requested. For example, the supplied buffers may not be large enough to accommodate the requested data."

I now see how that comment is meant. The buffer was always large enough but I didn't realize mDataByteSize was altered during the function call. So essentially the # of requested frames info needs to be supplied twice to ExtAudioFileRead(), and the # of fetched frames is also returned in two locations.

In retrospect I might have preferred receiving an error code when asking for more frames than my buffer size allowed.

patrick
--
Patrick Machielse
Hieper Software

http://www.hieper.nl
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: ExtAudioFileRead ioNumberFrames parameter can only be adjusted downward?
      • From: "Edwards, Waverly" <email@hidden>
References: 
 >ExtAudioFileRead ioNumberFrames parameter can only be adjusted downward? (From: patrick machielse <email@hidden>)
 >Re: ExtAudioFileRead ioNumberFrames parameter can only be adjusted downward? (From: Doug Wyatt <email@hidden>)

  • Prev by Date: Re: iOS AAC decode to LPCM
  • Next by Date: Is that possible to send an array of values from the Cocoa UI to the AU?
  • Previous by thread: Re: ExtAudioFileRead ioNumberFrames parameter can only be adjusted downward?
  • Next by thread: RE: ExtAudioFileRead ioNumberFrames parameter can only be adjusted downward?
  • Index(es):
    • Date
    • Thread