Page 56 of the sgtl5000 datasheet has two formulas for calculating the attack and release rate. They both don't work for me.

Excel calcs are

#1 = (1-(10^(-(A9/(20*B9))))*2^19) and the result for (A9 or rate_dBs = 32) and (B9 or SYS_FS = 44.1) = -482267 or FFFFF8a425

#1 = (1-(10^(-(A9/(20*B9))))*2^19) and the result for (A9 or rate_dBs = 32) and (B9 or SYS_FS = 1) = -13168 or FFFFFFCC90

Raw formula says (1 - (10^(-(Rate_dBs/(20*SYS_FS)))) * 2^19

Anyway, this formula shouldn't be this complex. Just give the clock calculations and the math should be straitforward.

Just throwing out some guesses

Its an overflow ticker, so

#1 = 0x10000 / Clock * dBsecond

#2 = 0x100000 / Clock * dBsecond

These come out in the ballpark anyway.