Re: fIsMixable
Re: fIsMixable
- Subject: Re: fIsMixable
- From: Jeff Moore <email@hidden>
- Date: Tue, 17 Jun 2003 13:07:56 -0700
On Tuesday, June 17, 2003, at 12:36 PM, BlazeAudio Developer wrote:
At 12:11 PM 6/17/2003, Chris Reed wrote:
Like Jeff said, having an exclusive mode won't get you any
performance benefits because the app will still be performing
float->int conversions.
I'm trying to understand the reason for this.
Is it because the application would probably want to do all processing
in
float?
Yes. Pretty much every modern audio app around does it's audio in
floating point.
Does the application have to do this conversion?
Not if the driver already does it for them.
Can an application not work with ints all the way?
Yes, but the extra crap you have to go through to do the headroom
management and what not in a fixed point engine can really increase the
CPU load of a DSP algorithm.
For example - if an application wants to play(or record) a 24 bit
(unpacked) PCM file - why would the conversion be necessary?
It wouldn't, but just doing playback or recording is not really what
the apps out there are doing. Even iTunes does non-trivial signal
processing on the job.
Would it not make a big difference if we were talking about 10 channels
of 192 KHz. audio?
Let's take a hard look at this supposed savings.
If the 24 bit samples are fully packed and only occupy 3 bytes, you
save 25% in memory, but you're setting yourself up for all sorts of
unaligned memory accesses if you have to touch the sample data which
will probably eat up most of the time (VM overhead, cache misses, etc)
you have saved by reducing the memory footprint. Plus, altivec'ing that
code will be hard unless you pad the samples out to four bytes.
If you do pad the samples out so that the 24 bit sample occupies 4
bytes, you are no longer saving anything in terms of memory, but are
increasing the overhead of the DSP by having to code all the bandwidth
management and other issues a fixed point engine entails.
So really, you end up saving some stuff in one area but spending that
savings and more when you try to do something non-trivial with the
data.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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.