philippe_44 wrote: 
> No and this is what is sad and embarassing: I just coded something
> stupid and happily wrote the same... as said, I'll probably stop for a
> while
> 
> 
> I just went for the simplest (or stupidest) but I think this does not
> matter much. The span of 25 is very arbitrary anyway. Do you really
> think that having the same ratio whatever the volume is will produce
> such an unpleasant effect, i.e. balance will sound good at some volume
> but bad at others?
> 
> 
> Thx

I'm not saying that the ratio matters, 25 is fine. It's the values that
are being sent by the server do not increase or decrease in a linear
manner.  They follow the progression of that list of numbers and there
are 101 values.  So, for example, it you set the volume to 96, instead
of sending 65536 * 0.96 = 62914, it sends 52224. So when the player
receives the value, instead of just dividing the raw value by 65536 to
get the gain, it looks for the closest value in the array and uses the
index of the item as the gain.

For you to implement it, it's very simple. Just take the gain adjustment
multiply it by 100 and use the value at that index on the list.  So, for
example, if the balance is set to 5, you'll use your formula, (25-5)/25
= 0.8 multiply by 100 to get 80. Then just take the value at index 80
from the array, which is 20992



--------------
Squeezebox apps for webOS, Android and Windows Phone,
http://www.angrygoatapps.com
------------------------------------------------------------------------
wt0's Profile: http://forums.slimdevices.com/member.php?userid=18760
View this thread: http://forums.slimdevices.com/showthread.php?t=114010

_______________________________________________
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss

Reply via email to