You can get the source code on github for squeezeplay
(controller,Touch,radio) .
There is a file Playback.lua .
There is 2 volume mappings in here . I dont read LUA so I cant really
figure which one is actually used but there are hundred discrete values
in "16 bit format" full volume is 65536 .
These trace nice logaritmic curves :) very close to each other ( I did
plot them in graph just to see ) .
How these map onto 24bit it cant say . It must be done somewhere else in
the code
Just get the complete file from github if you are familiar with the
programming language . I assume you need more than that to get the full
picture audio decoding is spread amongst a several files and
binaries....
Code:
--------------------
-- volumeMap has the correct gain settings for volume settings 1-100. Based
on Boom volume curve
--todo when this becomes SP device specific move to service method and make
it per-device
local _defaultVolumeToGain = {
16, 18, 22, 26, 31, 36, 43, 51, 61, 72, 85, 101, 120, 142, 168, 200, 237,
281, 333, 395, 468, 555, 658, 781, 926, 980, 1037, 1098, 1162, 1230, 1302,
1378, 1458, 1543, 1634, 1729, 1830, 1937, 2050, 2048, 2304, 2304, 2560, 2816,
2816, 3072, 3328, 3328, 3584, 3840, 4096, 4352, 4608, 4864, 5120, 5376, 5632,
6144, 6400, 6656, 7168, 7680, 7936, 8448, 8960, 9472, 9984, 10752, 11264,
12032, 12544, 13312, 14080, 14848, 15872, 16640, 17664, 18688, 19968, 20992,
22272, 23552, 24832, 26368, 27904, 29696, 31232, 33024, 35072, 37120, 39424,
41728, 44032, 46592, 49408, 52224, 55296, 58624, 61952, 65536,
}
local _serverVolumeToGain = _defaultVolumeToGain -- same since Squeezeplay.pm
uses Boom curve
--sb2 curve
--local _serverVolumeToGain = {
--232, 246, 260, 276, 292, 309, 327, 346, 366, 388, 411, 435, 460, 487, 516,
546, 578, 612, 648, 686, 726, 769, 814, 862, 912, 966, 1022, 1082, 1146, 1213,
1284, 1359, 1439, 1523, 1613, 1707, 1807, 1913, 2026, 2048, 2304, 2304, 2560,
2816, 2816, 3072, 3072, 3328, 3584, 3840, 4096, 4352, 4608, 4864, 5120, 5376,
5632, 5888, 6400, 6656, 7168, 7424, 7936, 8448, 8960, 9472, 9984, 10496, 11264,
11776, 12544, 13312, 14080, 14848, 15872, 16640, 17664, 18688, 19712, 20992,
22272, 23552, 24832, 26368, 27904, 29440, 31232, 33024, 35072, 37120, 39168,
41472, 44032, 46592, 49408, 52224, 55296, 58368, 61952, 65536,
--}
--provide hook for applets to modify the gain curve
function overrideDefaultVolumeToGain(self, value)
_defaultVolumeToGain = value
end
--------------------
Why would i even have this info ? Our member Peter W ? I think figured
how to fix the volume of the Touch ,before we got a server setting for
it .
In the old source i have its around line 819
decode:audioGain(data.gainL, data.gainR)
Replace it with .
decode:audioGain(65536, 65536)
This of-course makes it possible to put in any other number , But it
would be nice to know how the gain is implemented further down the
code/hardware to be able to use numbers hat dont truncate .
--------------------------------------------------------------------
Main hifi: Touch + CIA PS +MeridianG68J MeridianHD621 MeridianG98DH 2 x
MeridianDSP5200 MeridianDSP5200HC 2 xMeridianDSP3100 +Rel Stadium 3
sub.
Bedroom/Office: Boom
Kitchen: Touch + powered Fostex PM0.4
Misc use: Radio (with battery)
iPad1 with iPengHD & SqueezePad
(spares Touch, SB3, reciever ,controller )
server HP proliant micro server N36L with ClearOS Linux
http://people.xiph.org/~xiphmont/demo/neil-young.html
------------------------------------------------------------------------
Mnyb's Profile: http://forums.slimdevices.com/member.php?userid=4143
View this thread: http://forums.slimdevices.com/showthread.php?t=103842
_______________________________________________
audiophiles mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/audiophiles