On Feb 21, 2011, at 5:28 PM, Jean-Daniel Dupas wrote: Le 21 févr. 2011 à 23:08, Kevin Boyce a écrit :
On Feb 21, 2011, at 4:37 PM, Martin Hairer wrote:
It seems like MatrixMixer takes a huge amount of CPU, even just sitting there.
Sounds like a lot. In Amadeus Pro, I use a MatrixMixer for playback, even if
there's only one track present. On my MPB (2.53GHz Core Duo), playback
uses about 10% of (one) CPU, but this includes Apple's equalizing / compressing
which, as tahome says, already makes up quite a bit of an overhead... Maybe your
IO buffers are too small? Mine are currently set to 512 samples. If I go down to
32 samples, my CPU usage for simple playback goes up to 30%, which is closer
to what you see... Regards,
Hi Martin,
Thanks, I'll check that.
***time passes***
Okay, I checked and I'm using the default HAL Output Unit buffer size, which reports as 512 samples.
I'm getting about 18-19% usage of one CPU on my white MB (2.1GHz Core 2 Duo), through the headphone jack. (Same using an iMic.) That's fine performance, but I'm targeting the low end (schools, community theatres, etc.), and many of them still have PPC machines. I don't actually need the MatrixMixer yet, so I could ditch it, but it seems like I must be coming at it all crabbed to be getting that much CPU usage. And it's almost all overhead; it hardly changes when I'm playing a mess of files through it.
Thanks!
When running the Apple Sample code in Instrument, it reveal that almost 100% of the processing is done in -[NSWindow displayIfNeeded] which means that all the overhead you see is due to UI refresh. Even when running the mixer, the time passed in the audio unit is negligible compare to the UI overhead. -- Jean-Daniel
On my MacBook, it's a 50-50 split between the main thread and the HAL Runloop. (There was an equal amount of time in a second audio thread until I uninstalled Instant Hijack, but the HAL Runloop seems unchanged.)
In my own code, there was some display stuff that was sub-optimal, and I did find that with Instruments and clean it up. But something I'm doing (and I guess I can't say for sure it's MatrixMixer, but all I have is one of them in an AUGraph, connected to the HAL output unit) is making the CA runloop use 20% of one CPU.
|