Created
February 23, 2014 04:11
-
-
Save kode54/9166711 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int GetFrequenceValue(int input) | |
{ | |
if ( !input ) return 0; | |
if ( LinearFrqTab != 1 ) | |
{ | |
return input / FrequenceDivFactor; | |
} | |
else | |
{ | |
int64_t temp64; | |
int temp = 9216 - input; | |
int oct = temp / 768; | |
int offset = temp % 768; | |
oct = 14 - oct; | |
temp64 = (int64_t)LogTab[offset] * FrequenceMulFactor; | |
temp64 <<= 8; | |
temp64 >>= oct; | |
return (int) temp64; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment