Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6716213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:42:23+00:00 2026-05-26T08:42:23+00:00

I created custom audio player class which use AudioUnit and ExtAudioFile . In my

  • 0

I created custom audio player class which use AudioUnit and ExtAudioFile.
In my class I prepared my own render callback function such like

OSStatus MyAURenderCallack (
   void                        *inRefCon,
   AudioUnitRenderActionFlags  *ioActionFlags,
   const AudioTimeStamp        *inTimeStamp,
   UInt32                      inBusNumber,
   UInt32                      inNumberFrames,
   AudioBufferList             *ioData
);

When my application is foreground, parameter inNumberFrames passed by OS is always 512 or 1024, and my player works well.
But when the iOS device slept, inNumberFrames becomes 4096, and my player doesn’t work because it couldn’t prepare so much frames one time.

It is difficult to improve frame preparing process, because it heavily use extAudioFileRead function, which is hard to accelerate.

So, I want to restrict inNumberFrames from becoming bigger than 1024.
Can I make it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:42:23+00:00Added an answer on May 26, 2026 at 8:42 am

    As @sbooth noted, you should really be writing to disk in another thread. If not, this puts a real stress on your application’s main thread, which should be focused on delivering audio without dropouts.

    But to directly answer your question: no, you cannot directly tell the OS an exact number of frames to use for the blocksize. You can advise it to use a certain latency, which combined with the requested sample rate will give you a ballpark blocksize. However, there is no guarantee that iOS will give you this blocksize back.

    However, your best bet here is to make your algorithm work with arbitrary blocksizes. Unless you are doing something like convolution, it should generally be easier with larger blocksizes. So if you are having trouble at 4096, you should probably profile your code and see what the underlying problem is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating my own HTML5 audio player capable of handling playlists. I have created
I have created custom aplication resource: class Custom_Entitymanager extends Zend_Application_Resource_ResourceAbstract{ //... public function init
i created a Custom Trace Liastener inside a class library : namespace SendMailTraceListener {
I'm trying to create a custom audio effect by extending from the class android.media.audiofx.AudioEffect
I have created custom exception class public class Web2PDFException : Exception { public Web2PDFException(string
I created custom adapter like this public class SettingsAdapter extends BaseAdapter{ ArrayList<String> Noptions =
I have created custom result class to serialize json data to xml. I want
I have created Custom User Control which contain TextBox and PasswordBox. it is binding
I created custom django-admin command. I use this tutorial Writing custom django-admin commands For
I have created custom MembershipUser, MembershipProvider and RolePrivoder classes. These all work and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.