Re: Calculating peak level in db
Re: Calculating peak level in db
- Subject: Re: Calculating peak level in db
- From: Brian Willoughby <email@hidden>
- Date: Mon, 14 Oct 2002 11:30:50 -0700
[ By the way, I don't calculate abs of the max sample value but max
[ of (abs of each sample value)
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. This involves only two abs
operations per update, but still handles the case where a negative excursion
happens to be greater than any positive excursion over the range. Obviously, I
can't prove my hunch without benchmarking, but here's the general idea anyway
for your consideration.
Brian Willoughby
Sound Consulting
_______________________________________________
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.