• 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: Max simultaneous source count with Remote I/O Callback much lower than with OpenAL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Max simultaneous source count with Remote I/O Callback much lower than with OpenAL


  • Subject: Re: Max simultaneous source count with Remote I/O Callback much lower than with OpenAL
  • From: Michael Tyson <email@hidden>
  • Date: Sun, 12 Feb 2012 10:25:12 +0100

(D'oh - I replied to Hari directly; sending again to list)

Hi Hari,

Honestly, my first suggestion would be to use the built-in mixer if at all possible, rather than reinventing the wheel - it's fairly likely that the utilities that Apple provide will frequently be more optimal than anything you can do yourself, as they have access to low-level stuff that we don't.

If you do wish to do your own mixing for whatever reason - which is perfectly valid - you may find better performance by vectorising your code, instead of performing it all using scalar operations (take a look at the Accelerate framework, if you're not already familiar). 

You also do seem to be doing rather a lot of operations per frame, per source. There may be a more optimal way to adjust the playback rate (there are some suggestions at http://stackoverflow.com/questions/3326259/iphone-change-playback-speed-with-audio-units).

Best of luck,
Michael

On 10 Feb 2012, at 12:01, Hari Karam Singh wrote:

Hi,

I'm working on an iPhone4+ app which plays multiple long samples simultaneously, streaming them from the disk.  I original had it working pretty smoothly in OpenAL with 32 sources.  After discovering OpenAL was a wrapper for the AU 3D Mixer, I thought I'd get better performance rewriting the engine (minus all the 3D stuff) as a Remote I/O unit with an input render callback.  I was wrong.  Even though I'm just summing the sources I get about 1/5 the performance - heavy CPU use and cracking up at 10-15 simultaneous sources.  

Can anyone help me understand this disparity in performance?  Is the AU 3D Mixer super optimised with assembly is there something I should be doing better in my callback? "register" variables maybe? Or adding more than 1 source to the total with each loop??  I'm getting desperate here!

I've pasted the callback code below (is this encouraged on this list??) and here as well:  http://pastebin.com/AJDVY1j0  

 _______________________________________________
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: 
 >Max simultaneous source count with Remote I/O Callback much lower than with OpenAL (From: Hari Karam Singh <email@hidden>)

  • Prev by Date: Re: Convolution with large filters?
  • Next by Date: Re: Convolution with large filters?
  • Previous by thread: Max simultaneous source count with Remote I/O Callback much lower than with OpenAL
  • Next by thread: RE: Max simultaneous source count with Remote I/O Callback much lower than with OpenAL
  • Index(es):
    • Date
    • Thread