Re: Calculating peak level in db
Re: Calculating peak level in db
- Subject: Re: Calculating peak level in db
- From: "James Chandler Jr." <email@hidden>
- Date: Mon, 14 Oct 2002 15:37:14 -0400
>
I do not know exactly how expensive the abs() operation is, but I assume
it is
>
a bit more expensive than min() or max(). It might use less CPU to track
the
>
min and max sample value over the range you're summarizing, compare
abs(max) to
>
abs(min) and then select the larger of the two.
Its kinda aggravating "waste of CPU" to look at all the samplevalues just to
determine the max samplevalue, however it is done (GRIN).
Both Pentium and PPC have FPU FABS instructions that presumably should be
awfully efficient, since all they do is clear the sign bit. Hopefully a
compiler's interpretation of fabs would just use the primitive FPU assembler
instruction, but dunno if that is always the case.
James Chandler Jr.
_______________________________________________
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.