Aesculus wrote: 
> I'll turn on debug too and try out the various devices to see if I can
> see a pattern.
> 
> Hopefully it will be obvious and then I can put in some simple logic to
> figure out what the intent is.  The problem with a setting is that I
> think its client dependent.
> 
> My Denon is many years old and yours is probably much newer and it's
> also possible that some of the functions are supported differently
> between the systems.  So a bit of logic may be required to see what
> might be supported or not.

I have great news! I went over to the Logitech/slimserver Github site
and started browsing the Client.pm module in the slimserver/Slim/Player
folder to see what other callback subroutines are defined for the client
object besides the ones currently used by the plugin, such as name() to
retrieve the client name. Just for the heck of it, I did a search for
for "volume()" and voila! There it was! So I coded a call to it to see
what it returned when processing an incremental volume change and it
turns out that it returns the current player volume AFTER the
incremental change, which means it can be handled exactly the same way
as an absolute volume change simply by using the value returned by the
$client->volume() call instead of the passed argument (+2, -5, etc.). 
So I made the code changes and it works perfectly!  With this and the
other changes I made, the client and AVR volumes should always remain in
sync as long as the AVR volume is not changed manually, even without
using the client volume sync plugin option, and so far my testing is
confirming it.  I have attached this latest version of Plugin.pm and
hope that you can test it on some other client apps. There shouldn't be
any need to get debug output unless you're curious. I'm pretty sure that
incremental volume changes should work with any client now, and there is
no requirement to use client volume syncing unless, like me, you
sometimes use your AVR's remote to change the volume. By the way, my
Denon is a 2010 AVR-3311CI, so possibly older than yours. By the way, I
promise not to upload another 'new and improved' version for at least a
few days. ;)


+-------------------------------------------------------------------+
|Filename: Plugin.pm                                                |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=33352|
+-------------------------------------------------------------------+


Sam
------------------------------------------------------------------------
SamY's Profile: http://forums.slimdevices.com/member.php?userid=63495
View this thread: http://forums.slimdevices.com/showthread.php?t=60114

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

Reply via email to