Bugzilla – Bug 11887
Duet sends out too many volume step events on single click.
Last modified: 2009-10-05 14:27:20 UTC
Created attachment 5155 [details] This has the changes search for -- GGM The Timer is set too fast. I changed it from 100ms to 250ms. This is the minimum to avoid a double step in volume on a single click. When you press a key you get two events, a KEY_PRESS and a KEY_DOWN and both were calling update volume. I commented the KEY_DOWN one out (last one). Prior to my changes one quick click on volume up or down would issue 4-5 steps in volume. The file attached is based on 7.2 but with the customizations to send out IR codes. But I believe the bug is in the core code as well and the lastest 7.4 release. Search for comments that begin with -- GGM
Richard: what do you think? Seems reasonable to me. Tom: is this applicable to SqueezePlay in general on all platforms?
Turns out this problem may not be as related to your core implementation as I first thought. I have further looked at the Duet original volume.lua version (sorry I should have looked at it before posting this bug) and it has a slightly different behavior. And the additions Thomas Houlberg made to implement IR control surfaced half the problem I described in this bug. Thomas added an Extra SendIR in the EVENT_KEY_PRESS which causes the the duplicate volume updates. I think the reason he added this was that on the original volume.lua if you touch the volume key you get no change so the user can review volume without changing it. But since using the IR implementation the volume slider has no value, you might as well send out an IR volume up or down. But in that change he introduced a double event. What I think he should have done is just remove the condition that the onscreen is up. But independent of that I think the timer is probably still to fast for any implementation to change volume by one step. If you do decide to adjust the timer you may have to twiddle the acceleration a bit to get a reasonable "top speed". Because changing the timer from 100 to 250 will slow everything down.
Since we changed some things since your original work on 7.3.3 I think we're just going to let this bug rest and we can revisit it after the 7.3.3 release if there continues to be an issue. Thanks, George for your work!
Created attachment 5163 [details] This is from SqueezeCenter-7.4-26222 with the recommended changes search GGM I installed SqueezeCenter-7.4-26222 and made only the changes that I recommend. However I noticed another bug introduced since 7.2 If the user taps volume down it works as expected, if they tap volume up NOTHING happens. If they hold the Volume up or down it works as expected and the wheel works fine. But Tapping up is broken. This has nothing to do with my recommended change. The problem I found in the IR version does have the same erratic stepping which this file fixes. It's only 3 lines commented out and a timer change.
I installed SqueezeCenter-7.4-26222 and made only the change I recommend and attached it. 3 commented out lines and one timer change. NOTE: Also found a new bug in latest build that is probably more serious. Tapping Volume down works but tapping volume up does not work at all (wheel and volume up with hold does work). I suspect it's in acceleration calculation because the "IR" version I use works fine on tap up which uses the delta value directly but it does not use the accelerated calculation (variable called "new" in _updateVolume).
Moving to the product SqueezePlay because this bug appears to apply to any player based on that application code. Feel free to move it back if it's specific to the original product.
not a new bug - defer
This impacts baby, it's needed.
This is now fixed.
This bug has been marked as fixed in the 7.4.0 release version of SqueezeBox Server! * SqueezeCenter: 28672 * Squeezebox 2 and 3: 130 * Transporter: 80 * Receiver: 65 * Boom: 50 * Controller: 7790 * Radio: 7790 Please see the Release Notes for all the details: http://wiki.slimdevices.com/index.php/Release_Notes If you haven't already, please download and install the new version from http://www.logitechsqueezebox.com/support/download-squeezebox-server.html If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.