• 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: fIsMixable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fIsMixable


  • Subject: Re: fIsMixable
  • From: Andrew Pinski <email@hidden>
  • Date: Tue, 17 Jun 2003 23:33:52 -0400

On Tuesday, Jun 17, 2003, at 17:08 US/Eastern, Markus Fritze wrote:

On Dienstag, Juni 17, 2003, at 01:12 Uhr, James Chandler Jr wrote:

If just playing or recording a file, it might be desirable to avoid float-int conversions.

But in this case performance is not an issue anyhow :-)

Logic does all it's internal processing in float (or even double, if necessary). I would expect that every even half-professional audio application does so, too. You don't have to deal with clipping and you can do real math without converting (converting float->int is extremely costly on a PowerPC!). How much effort is even a volume control with clipping in integer math? It is one cycle in float...

float to int is 3 instructions (most of the times gcc does not schedule this well and it does not use
the optional instruction for storing half of the floating point registers, this saves space on the stack):
one conversion, one store and one load.
int to float is the really expensive one (gcc really does not schedule this well at all):
one xor, one load fp, two store ints, one load fp, and one fp subtract and
one for double to signal floating points(7 instructions).

But you should avoid int to float and float to int, even int to double and double to int as they
are more expensive than doing additions in floating point (except that you have to load a "1.0"
into the fp register which can cost if you do not use "1.0f").

Using Shikari from the CHUD tools by Apple (shameless plug here) can find you bottle-necks for you.


Thanks,
Andrew Pinski
_______________________________________________
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.

References: 
 >Re: fIsMixable (From: Markus Fritze <email@hidden>)

  • Prev by Date: ioproc and recording audio
  • Next by Date: Re: How to get clock and tell it to the synthesizer AU
  • Previous by thread: Re: efficient device channel enabling - was Re: fIsMixable
  • Next by thread: Re: fIsMixable
  • Index(es):
    • Date
    • Thread