Re: IOAudioMixerEngine.cpp
Re: IOAudioMixerEngine.cpp
- Subject: Re: IOAudioMixerEngine.cpp
- From: Matthew Xavier Mora <email@hidden>
- Date: Wed, 7 Aug 2002 16:36:13 -0700
At 4:07 PM -0700 8/7/02, Jeff Moore wrote:
On Wednesday, August 7, 2002, at 02:38 PM, Nathan Aschbacher wrote:
Okay so I'm trying to clarify something.
It looks as though that IOAudioMixerEngine.cpp implements the
IOAudioFamily's main mixing function called "mixOutputSamples".
Yup. This is true. This function does the floating point mix from
the HAL client's buffer into the main mix bus at the time indicated
by the HAL in the call to performClentIO.
Am I to understand that this is where the CPU spends it's time mixing audio
buffers for use by the rest of the audio pipeline. If so it seems very
minimalist doing primarily 4 sequential additions and some clean-up work. I
don't understand why this function has such a high CPU burden given that it
doesn't do much and what it does do is almost the fastest operation that the
FPU can do. Which I guess is what makes me skeptical out whether or not
this is the right place to be looking to override a function to prevent the
main CPU from having to continually mix the audio buffers itself.
Doubtful. I have measured the performance of this routine and it is
very fast. It takes on the order of 20-30 microseconds to mix a 128
stereo sample frames on my 500 MHz TiPB.
That said, I'm sure that there is room for improvement in the code
by hand coding the assembly like we did with the float to int
conversions.
If I understand his intentions correctly he wishes to do hardware
mixing and output (ie the samples stay on the card once grabbed from
the IOProc). So he would save mixing (not much to gain there unless
there are dozens of clients) and clipping/conversion. So he may gain
a few percent if he can program the DSP on his card to do mixing and
float to int conversion and clipping. In a game environment every
little bit helps. :-)
Matt
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.