Bugzilla – Bug 11330
SqueezeSlave playertype bandwidth limiting bug fix and new features support
Last modified: 2009-06-11 04:43:22 UTC
Created attachment 4918 [details] Updates SqueezeSlave.pm, Slimproto.pm Creates Text16VFD.pm, Text16.pm Set maxBitrate preference to 0, instead of undefined to fix the issue of band width limiting being enabled by default for squeezeslave. This is a problem for users who do not have lame installed as the band width limiting option is not available to change in the WebUI player settings until lame is installed and SC has been restarted. Updated hasIR function to reflect Squeezeslave new IR feature. Added canDoReplayGain gain function to SqueezeSlave.pm to support replay gain. Added support for variable sized displays for use with console and lcd displays.
Please correct me if I'm wrong, I only had a brief look at the patch. But couldn't the Text16 classes inherit from Text instead of copying the full files with only a few changes applied?
You are correct of course. I didn't write those modules they were provided by another squeezeslave user. He suggested that the new modules could be used as drop in replacements for the standard Text modules. What's your suggestion on how to proceed?
If these should be _replacements_, then a patch to the existing file would do. If they're to be _added_, then they should be refactored to inherit from the base Text classes and only overwrite what's needed to be changed.
Created attachment 4924 [details] Updates SqueezeSlave.pm, Slimproto.pm, TextVFD.pm and Text.pm I've respun the patch to support variable width displays using Text.pm and TextVFD.pm removing the hard coded limit of 40 characters. This patch applies the updates to SqueezeSlave.pm and Slimproto.pm as well.
Michael, Any chance you'll get some time to review my patch and include in 7.4?
Adrian/Andy - you know that part of the code much better than I do. Any opinion on this patch?
I don't really know much about the text display modules. Has this been tested with slimp3 and SB1?
No, I don't have either unit to test with. The patch uses the default 40 character display width if no size is specified, so hopefully, it's transparent.
I'm happy to look at the text bit, but could I ask for details of the application? If you are looking to get a display for squeezeslave, would a better method be to use the displaystatus updates which already exist in the server. You can register over cli or json to receive display updates and will get the a bitmap from the graphics display which could then be rendered by squeezeslave, it allows setting the width too for graphical displays.
Actually the display code is already in squeezeslave. It supports both an on screen text display using the curses library and usb lcd displays. The text display change in SC was to accomodate displays with different sizes. The squeezeslave wiki page has more details in the linux help section. If we could confirm that the current changes work fine with slimp3 and SB1 then the patch could just be applied.
OK understand. Can the display stuff be tested easily on linux without an external display? I'll have a look at it and integrate - I think there may be a couple of bits I would like to change to make them as consitent as possible with the graphics display code, but nothing major from a quick review.
Yes, you can specify the display width using -w60 for example with the on screen curses display.
Sorry, -D -w60
Ralph - is there a prebuilt linux r33 version to try this with (not on sourceforge?)
The display code hasn't changed in a while. You could use anything from r25 or r26. Alternately, I can build a current one for you. 2.6 kernel and alsa?
Actually squeezeslave-0.8-25-lnx26-alsa-display-i686.tar.gz is the only one that has the display code option enabled.
I've uploaded squeezeslave-0.8-33-lnx26-alsa-display-i686.tar.gz to sf.net as well.
Ralph - applied with a few minor changes in change 25809. Please check it works for you - I've tested on SB1 and squeezeslave and think it does what you where expecting..
I just saw the following warnings in my server log. Could they be related to this new code? [09-04-05 03:55:33.7152] Slim::Utils::Misc::msg (1113) Warning: [03:55:33.7147] Use of uninitialized value in multiplication (*) at C:/Program Files/SqueezeCenter 7.4 Trunk/server/Slim/Player/SqueezeSlave.pm line 136. [09-04-05 03:55:33.7159] Slim::Utils::Misc::msg (1113) Warning: [03:55:33.7155] Use of uninitialized value in multiplication (*) at C:/Program Files/SqueezeCenter 7.4 Trunk/server/Slim/Player/SqueezeSlave.pm line 136.
Try change 25816
Adrian, Thank you for taking the time to make the modifications to the patch and including them in SC. Initial testing looks good. I'm going to fix a squeezeslave problem with the time display resetting to the total track time if you pause/unpause. I'll then create a post asking the squeezeslave users to test it further. I don't have an external display either, but I know there are users who do.
Created attachment 5222 [details] Fix dBToFixed calls and Can't call method hasPowerControl SC log error The display updates have been working very well with squeezeslave. I did find a couple other issues with SqueezeSlave.pm and have attached a patch to fix them. Define sub hasPowerControl to fix this SC log error. [09-05-14 07:21:26.7579] Slim::Networking::IO::Select::select (271) Error: Select task failed: Can't call method "hasPowerControl" on an undefined value at /usr/lib/perl5/5.8.8/Slim/Web/Settings/Player/Audio.pm line 36. Calls to dBToFixed were not returning the correct values due to incorrect calling reference.
patch added in change 26720
Changes have been working great.