June 05, 2014, 11:41:31 Last Edit: July 01, 2014, 14:43:11 by Einhard
After upgrading perl to version 5.2 I get
QuoteInvalid version format (non-numeric data) at /usr/lib/perl5/core_perl/Encode.pm line 12.
BEGIN failed--compilation aborted at /usr/lib/perl5/core_perl/Encode.pm line 12.
Compilation failed in require at /usr/bin/gmusicbrowser line 26.
BEGIN failed--compilation aborted at /usr/bin/gmusicbrowser line 26.
as expected running with LC_ALL=C gmusicbrowser solves the problem but also killing localization support

Oh and can you make clipping prevention as option? I have a feeling it doesn't work as intended with mplayer backend and global volume other than 100. Whole replaygain analysis for mplayer seems a bit off or rather mplayer volume calculation (at least for my ears). I must change that line whenever I am updating gmusicbrowser and as I am using git it happens quite a lot (just call me lazy  ;D).

it's perl 5.20 not perl 5.2 :)

There is a change in perl 5.20 that causes problems when a library (in our case gtk) sets the locale without telling perl : https://rt.perl.org/Public/Bug/Display.html?id=121930
It shouldn't be too hard to fix, but I'll need to able to test it, which I currently can't.
I'm sure perl-gtk2 will include a fix of their own soon.

About the clipping prevention, if the problem is only that it doesn't work correctly, I'd rather fix it. I'll try to take a look and see if I see/hear a problem.

#2 June 08, 2014, 20:47:28 Last Edit: June 08, 2014, 23:04:19 by Einhard
Quote from: Quentin Sculo on June 08, 2014, 17:39:30
it's perl 5.20 not perl 5.2 :)
haha my bad I am always getting caught with this  ;D

Quote
About the clipping prevention, if the problem is only that it doesn't work correctly, I'd rather fix it. I'll try to take a look and see if I see/hear a problem.
Personally I am using track gain tag as volume control for each track. Replaygain analysis just doesn't do the job right, especially with mix of old songs mastered in times when loudness wasn't top priority and new ones. When I got my whole collection through replaygain analysis volume was all over the place, much worse than before the whole process. That's why I got global volume on 60 and if some track is too quiet I just adjust it's track gain tag (entering manually also peak on advanced tags seems too tiresome) . Problem with clipping prevention is that it works the same regardless of global volume

example:
with clipping prevention
At 60% volume program is parsing
mplayer -volume 21.6
and with 1dB track gain tag (no peak selected so it's probably 1)
mplayer -volume 21.6
At 100% volume and replaygain analysis (4.26 dB gain, 0.73 peak)
mplayer -volume 136.85

without clipping prevention:
At 60% volume program is parsing
mplayer -volume 21.6
and with 1dB track gain tag
mplayer -volume 24.24
How can be clipping here? With 136.85 no clipping and with 24.24 there is?

I just want to have more control over volume for each track. I know I am doing it wrong (without lowering the peak) but I don't see any other way to easily get the right volume per track.

Hi,

Same problem here for Perl 5.20 since update.
But on this link they said to simply "use locale" inside the script.
So, as error appear on line 26 in /usr/bin/gmusicbrowser Invalid version format (non-numeric data) at /usr/lib/perl5/site_perl/Encode.pm line 12.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/Encode.pm line 12.
Compilation failed in require at /usr/bin/gmusicbrowser line 26.
BEGIN failed--compilation aborted at /usr/bin/gmusicbrowser line 26.


Where should I paste "use locale" in use strict;
use warnings;
use utf8;

package main;
use Gtk2 '-init';
use Glib qw/filename_from_unicode filename_to_unicode/;
use POSIX qw/setlocale LC_NUMERIC LC_MESSAGES LC_TIME strftime mktime _exit/;
use Encode qw/_utf8_on _utf8_off/; #<---- LINE 26
??

Thanks,

Quote from: hansi on June 13, 2014, 23:24:43
Where should I paste "use locale"
You can try putting it before "use Gtk2 '-init';"
Let me know if it works

Quote from: Quentin Sculo on June 13, 2014, 23:29:38
You can try putting it before "use Gtk2 '-init';"
Let me know if it works
Unfortunately no, it does not work. What can we try now?  :-/

This should now be fixed in perl-gtk2 git (https://rt.perl.org/Ticket/Display.html?id=121930#txn-1298808).

In the mean time, running it with LC_NUMERIC=C should work and give you translations, just with dot as the decimal separator.

Also you can try changing the line "use Gtk2 '-init';" by
use Gtk2;
use POSIX qw/locale_h/;
BEGIN{ POSIX::setlocale (LC_ALL, ""); Gtk2::init (); }

I can confirm this, it's fixed upstream now