Re: Calculating peak level in db
Re: Calculating peak level in db
- Subject: Re: Calculating peak level in db
- From: Richard Dobson <email@hidden>
- Date: Mon, 14 Oct 2002 18:44:26 +0100
Indeed; but I was outlining the principle, not the implementation. I suppose I
should have said "multiply by the reciprocal of 32768", but someone would be
bound to ask "what's a reciprocal?" and "why?"....
Richard Dobson
Matthew Xavier Mora wrote:
At 11:23 AM +0100 10/13/02, Richard Dobson wrote:
Conversely, on converting 16bit ints to float, which is what I think
you are referring to, the usual trick is to convert the sample
directly to float and then divide by 32768, so that -32768 converts to
-1.0, and 32767 converts to a value very very very slightly less than
1.0 (I guess the driver writers will be able to desccribe precisely
what they do here...).
For speed reasons we try and avoid divide operations if at all possible.
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.
_______________________________________________
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.