• 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: "Edwards, Waverly" <email@hidden>
  • Date: Wed, 28 Sep 2011 14:29:21 -0500
  • Acceptlanguage: en-US
  • Thread-topic: ExtAudioFileRead ioNumberFrames parameter can only be adjusted downward?

Interesting.  A number of months ago, I had this same issue.  Sorry, I didn't recognize your issue based on the symptoms.
I know its documented but it is definitely not obvious or clear the number of frames read are changed.

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

Agreed.


W.
-----Original Message-----
From: coreaudio-api-bounces+waverly.edwards=email@hidden [mailto:coreaudio-api-bounces+waverly.edwards=email@hidden] On Behalf Of patrick machielse
Sent: Wednesday, September 28, 2011 11:07 AM
To: Doug Wyatt
Cc: email@hidden
Subject: Re: ExtAudioFileRead ioNumberFrames parameter can only be adjusted downward?

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
 _______________________________________________
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: 
 >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>)
 >Re: ExtAudioFileRead ioNumberFrames parameter can only be adjusted downward? (From: patrick machielse <email@hidden>)

  • Prev by Date: Re: aumu 32/64-bit intel cocoa view
  • Next by Date: Re: aumu 32/64-bit intel cocoa view
  • Previous by thread: Re: ExtAudioFileRead ioNumberFrames parameter can only be adjusted downward?
  • Next by thread: 'aufc' type AU not appearing in AULab
  • Index(es):
    • Date
    • Thread