I described it in the earlier post: Simple answer: +6 equates to +3dB, ie 0.5dB per integer.

Long answer:

The player doesn't really know about dB levels when it sets the volume. There is a table of 100 volume levels, and the player just moves to the previous/next entry in the table and applys it in order to decrease/increase the volume. It then reads back the dB value associated with that row in tha table to send to the display so that the user can say "My volumes set to xx dB". So the way that the boost works at the moment by jumping up or down nn rows in the table where nn is the config.ini parameter.So +6 equates to pressing "vol up" 6 times or rotating the knob slowly 6 clicks clockwise.

I also mentioned that I needed feedback on the non-linearity issue. This is because the table is non-linear. Right at the bottom of the scale, we start with approximately 3dB per step, and above -3dB, it is 1dB per step.

But for most of the useful range (-25dB to -3dB), it is approximately 0.5dB per step. Because it is 0.5dB for so much of the range, it doesn't make much sense for me to write code to take a dB value from config.ini and iteratively find the row that is nearest to it. I'd have to get the current volume, read the assosciated dB value, add the config.ini dB value, and then read the table until I found the line. Granted, this could be done without too many coding nightmares, but it doesn't really seem worth it if I can just do integer math on the table index with acceptable results.

Here is the table so you can see what I'm talking about:


{ 0x000, 0xf80, -9999 }, /* Zero */
{ 0xfff, 0xf80, -6620 }, /* -66.2 dB intensity 0.023988 */
{ 0xffe, 0xf80, -6270 }, /* -62.7 dB intensity 0.053703 */
{ 0xffd, 0xf80, -5820 }, /* -58.2 dB intensity 0.151356 */
{ 0xffc, 0xf80, -5530 }, /* -55.3 dB intensity 0.295121 */
{ 0xffb, 0xf80, -5310 }, /* -53.1 dB intensity 0.489779 */
{ 0xffa, 0xf80, -5140 }, /* -51.4 dB intensity 0.724436 */
{ 0xff9, 0xf80, -4990 }, /* -49.9 dB intensity 1.023293 */
{ 0xff8, 0xf80, -4870 }, /* -48.7 dB intensity 1.348963 */
{ 0xff7, 0xf80, -4760 }, /* -47.6 dB intensity 1.737801 */
{ 0xff6, 0xf80, -4660 }, /* -46.6 dB intensity 2.187762 */
{ 0xff5, 0xf80, -4580 }, /* -45.8 dB intensity 2.630268 */
{ 0xff4, 0xf80, -4500 }, /* -45.0 dB intensity 3.162278 */
{ 0xff3, 0xf80, -4420 }, /* -44.2 dB intensity 3.801894 */
{ 0xff2, 0xf80, -4360 }, /* -43.6 dB intensity 4.365158 */
{ 0xff1, 0xf80, -4290 }, /* -42.9 dB intensity 5.128614 */
{ 0xff0, 0xf80, -4240 }, /* -42.4 dB intensity 5.754399 */
{ 0xfef, 0xf80, -4180 }, /* -41.8 dB intensity 6.606934 */
{ 0xfed, 0xf80, -4080 }, /* -40.8 dB intensity 8.317638 */
{ 0xfeb, 0xf80, -3990 }, /* -39.9 dB intensity 10.232930 */
{ 0xfe9, 0xf80, -3910 }, /* -39.1 dB intensity 12.302688 */
{ 0xfe7, 0xf80, -3840 }, /* -38.4 dB intensity 14.454398 */
{ 0xfe4, 0xf80, -3740 }, /* -37.4 dB intensity 18.197009 */
{ 0xfe1, 0xf80, -3650 }, /* -36.5 dB intensity 22.387211 */
{ 0xfde, 0xf80, -3570 }, /* -35.7 dB intensity 26.915348 */
{ 0xfdb, 0xf80, -3490 }, /* -34.9 dB intensity 32.359366 */
{ 0xfd8, 0xf80, -3420 }, /* -34.2 dB intensity 38.018940 */
{ 0xfd5, 0xf80, -3360 }, /* -33.6 dB intensity 43.651583 */
{ 0xfd2, 0xf80, -3300 }, /* -33.0 dB intensity 50.118723 */
{ 0xfcf, 0xf80, -3250 }, /* -32.5 dB intensity 56.234133 */
{ 0xfcb, 0xf80, -3180 }, /* -31.8 dB intensity 66.069345 */
{ 0xfc7, 0xf80, -3110 }, /* -31.1 dB intensity 77.624712 */
{ 0xfc3, 0xf80, -3050 }, /* -30.5 dB intensity 89.125094 */
{ 0xfbf, 0xf80, -3000 }, /* -30.0 dB intensity 100.000000 */
{ 0xfbb, 0xf80, -2950 }, /* -29.5 dB intensity 112.201845 */
{ 0xfb7, 0xf80, -2900 }, /* -29.0 dB intensity 125.892541 */
{ 0xfb3, 0xf80, -2850 }, /* -28.5 dB intensity 141.253754 */
{ 0xfaf, 0xf80, -2810 }, /* -28.1 dB intensity 154.881662 */
{ 0xfab, 0xf80, -2760 }, /* -27.6 dB intensity 173.780083 */
{ 0xfa7, 0xf80, -2720 }, /* -27.2 dB intensity 190.546072 */
{ 0xfa2, 0xf80, -2680 }, /* -26.8 dB intensity 208.929613 */
{ 0xf9e, 0xf80, -2640 }, /* -26.4 dB intensity 229.086765 */
{ 0xf99, 0xf80, -2600 }, /* -26.0 dB intensity 251.188643 */
{ 0xf93, 0xf80, -2550 }, /* -25.5 dB intensity 281.838293 */
{ 0xf8d, 0xf80, -2500 }, /* -25.0 dB intensity 316.227766 */
{ 0xf86, 0xf80, -2450 }, /* -24.5 dB intensity 354.813389 */
{ 0xf7f, 0xf80, -2400 }, /* -24.0 dB intensity 398.107171 */
{ 0xf77, 0xf80, -2350 }, /* -23.5 dB intensity 446.683592 */
{ 0xf6f, 0xf80, -2300 }, /* -23.0 dB intensity 501.187234 */
{ 0xf66, 0xf80, -2250 }, /* -22.5 dB intensity 562.341325 */
{ 0xf5d, 0xf80, -2200 }, /* -22.0 dB intensity 630.957344 */
{ 0xf54, 0xf80, -2150 }, /* -21.5 dB intensity 707.945784 */
{ 0xf49, 0xf80, -2100 }, /* -21.0 dB intensity 794.328235 */
{ 0xf3f, 0xf80, -2050 }, /* -20.5 dB intensity 891.250938 */
{ 0xf33, 0xf80, -2000 }, /* -20.0 dB intensity 1000.000000 */
{ 0xf27, 0xf80, -1950 }, /* -19.5 dB intensity 1122.018454 */
{ 0xf1a, 0xf80, -1900 }, /* -19.0 dB intensity 1258.925412 */
{ 0xf0d, 0xf80, -1850 }, /* -18.5 dB intensity 1412.537545 */
{ 0xefe, 0xf80, -1800 }, /* -18.0 dB intensity 1584.893192 */
{ 0xeef, 0xf80, -1750 }, /* -17.5 dB intensity 1778.279410 */
{ 0xedf, 0xf80, -1700 }, /* -17.0 dB intensity 1995.262315 */
{ 0xece, 0xf80, -1650 }, /* -16.5 dB intensity 2238.721139 */
{ 0xebb, 0xf80, -1600 }, /* -16.0 dB intensity 2511.886432 */
{ 0xea8, 0xf80, -1550 }, /* -15.5 dB intensity 2818.382931 */
{ 0xe94, 0xf80, -1500 }, /* -15.0 dB intensity 3162.277660 */
{ 0xe7e, 0xf80, -1450 }, /* -14.5 dB intensity 3548.133892 */
{ 0xe67, 0xf80, -1400 }, /* -14.0 dB intensity 3981.071706 */
{ 0xe4f, 0xf80, -1350 }, /* -13.5 dB intensity 4466.835922 */
{ 0xe36, 0xf80, -1300 }, /* -13.0 dB intensity 5011.872336 */
{ 0xe1a, 0xf80, -1250 }, /* -12.5 dB intensity 5623.413252 */
{ 0xdfe, 0xf80, -1200 }, /* -12.0 dB intensity 6309.573445 */
{ 0xddf, 0xf80, -1150 }, /* -11.5 dB intensity 7079.457844 */
{ 0xdbf, 0xf80, -1100 }, /* -11.0 dB intensity 7943.282347 */
{ 0xd9d, 0xf80, -1050 }, /* -10.5 dB intensity 8912.509381 */
{ 0xd78, 0xf80, -1000 }, /* -10.0 dB intensity 10000.000000 */
{ 0xd52, 0xf80, -950 }, /* -9.5 dB intensity 11220.184543 */
{ 0xd29, 0xf80, -900 }, /* -9.0 dB intensity 12589.254118 */
{ 0xcfe, 0xf80, -850 }, /* -8.5 dB intensity 14125.375446 */
{ 0xcd1, 0xf80, -800 }, /* -8.0 dB intensity 15848.931925 */
{ 0xca0, 0xf80, -750 }, /* -7.5 dB intensity 17782.794100 */
{ 0xc6d, 0xf80, -700 }, /* -7.0 dB intensity 19952.623150 */
{ 0xc37, 0xf80, -650 }, /* -6.5 dB intensity 22387.211386 */
{ 0xbfe, 0xf80, -600 }, /* -6.0 dB intensity 25118.864315 */
{ 0xbc1, 0xf80, -550 }, /* -5.5 dB intensity 28183.829313 */
{ 0xb80, 0xf80, -500 }, /* -5.0 dB intensity 31622.776602 */
{ 0xb3c, 0xf80, -450 }, /* -4.5 dB intensity 35481.338923 */
{ 0xaf4, 0xf80, -400 }, /* -4.0 dB intensity 39810.717055 */
{ 0xa56, 0xf80, -300 }, /* -3.0 dB intensity 50118.723363 */
{ 0x9a5, 0xf80, -200 }, /* -2.0 dB intensity 63095.734448 */
{ 0x8df, 0xf80, -100 }, /* -1.0 dB intensity 79432.823472 */
{ 0x800, 0xf80, 0 }, /* 0.0 dB intensity 100000.000000 */
{ 0x800, 0xf70, 100 }, /* 1.0 dB intensity 125892.541179 */
{ 0x800, 0xf5f, 200 }, /* 2.0 dB intensity 158489.319246 */
{ 0x800, 0xf4b, 300 }, /* 3.0 dB intensity 199526.231497 */
{ 0x800, 0xf35, 400 }, /* 4.0 dB intensity 251188.643151 */
{ 0x800, 0xf1c, 500 }, /* 5.0 dB intensity 316227.766017 */
{ 0x800, 0xf01, 600 }, /* 6.0 dB intensity 398107.170554 */
{ 0x800, 0xee1, 700 }, /* 7.0 dB intensity 501187.233627 */
{ 0x800, 0xebe, 800 }, /* 8.0 dB intensity 630957.344480 */
{ 0x800, 0xe97, 900 }, /* 9.0 dB intensity 794328.234724 */
{ 0x800, 0xe6c, 1000 }, /* 10.0 dB intensity 1000000.000000 */


As to how high or low you can go, at the moment the alpha code will let you go 100 steps in either direction. But, as I said, the volume will max out at row 100, +10dB. If you try to push a +20 boost on top of a -3dB player volume, you're still only going to hear +10dB. (In the same vein, pushing a -50 cut on a player volume of -30dB is going to result in silence!)



Edited by genixia (19/03/2002 15:48)
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.