peterw;534906 Wrote: > Currently it's just an internal Perl API, but I'd be happy to add a > CLI/JSON API. Perhaps you could subscribe to something like 'ampgain' > notifications, and receive player-specific notifications when the gain > changes, with tagged data like "dbgain:-20.5" and "mute:0" for -20.5 dB > gain, not muted?
Thinking about this a bit more, this seems like an awfully chatty/heavy approach. For MIS, the internal Perl API basically allows DenonSerial to say, oh, you want a dB gain value for volume 50 for the family room player? I control that, and its range is -80 to 0, so let's call that -40 dB. Simple math. Seems heavy to rely on Comet/HTTP/JSON to tell an applet that 50/100 = -40 dB. It'd be easier to either have CLI for delivering a 100-member array of ampgain values for those few players that have external amp volume control (and doing so only once per player). I don't know what a 101-item Lua array of signed decimal/float values costs in terms of RAM, but I would think using a lookup table on your side would be more efficient & responsive than using CLI. I'm not sure how best to handle mute state. Currently I use an IR remote and mute my amp rather than send a Squeezebox mute command, so I don't know if mute has any affect on a fixed volume player (hopefully it at least doesn't use that cute fade up/down code that pause tends to do on normal variable output players), or how an external app would know that the external amp was muted, turned off, etc. -- peterw http://www.tux.org/~peterw/ Free plugins: 'AllQuiet' (http://www.tux.org/~peterw/slim/AllQuiet.html) 'Auto Dim/AutoDisplay' (http://www.tux.org/~peterw/slim/AutoDisplay.html) 'BlankSaver' (http://www.tux.org/~peterw/slim/BlankSaver.html) 'ContextMenu' (http://www.tux.org/~peterw/slim/ContextMenu.html) 'DenonSerial' (http://www.tux.org/~peterw/slim/DenonSerial.html) 'FuzzyTime' (http://www.tux.org/~peterw/slim/FuzzyTime.html) 'KidsPlay' (http://www.tux.org/~peterw/slim/KidsPlay.html) 'KitchenTimer' (http://www.tux.org/~peterw/slim/KitchenTimer.html) 'PlayLog' (http://www.tux.org/~peterw/slim/PlayLog.html) 'PowerCenter/BottleRocket' (http://www.tux.org/~peterw/slim/PowerCenter.html) 'SaverSwitcher' (http://www.tux.org/~peterw/slim/SaverSwitcher.html) 'SettingsManager' (http://www.tux.org/~peterw/slim/SettingsManager.html) 'SleepFade' (http://www.tux.org/~peterw/slim/SleepFade.html) 'StatusFirst' (http://www.tux.org/~peterw/slim/StatusFirst.html) 'SyncOptions' (http://www.tux.org/~peterw/slim/SyncOptions.html) 'VolumeLock' (http://www.tux.org/~peterw/slim/VolumeLock.html) ------------------------------------------------------------------------ peterw's Profile: http://forums.slimdevices.com/member.php?userid=2107 View this thread: http://forums.slimdevices.com/showthread.php?t=77161 _______________________________________________ Touch mailing list Touch@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/touch