bug-gnupod
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnupod] Patch to support ReplayGain / mp3gain


From: H. Langos
Subject: Re: [Bug-gnupod] Patch to support ReplayGain / mp3gain
Date: Mon, 11 May 2009 14:35:50 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Richard,

On Sun, May 10, 2009 at 10:53:42PM +0200, H. Langos wrote:
> On Sun, May 10, 2009 at 10:35:57AM +0200, Richard van den Berg wrote:
> 
> > Do you want to wait until we have a all of the above working before you  
> > commit my current ReplayGain patches to CVS?
> 
> I hope I get around to commit those changes tomorrow.

I made a couple of changes before commiting your patches.

First of all I changes the option --no-ape to --no-ape-tag. ".ape" is also 
an audio file extention and naming the option only "--no-ape" could suggest 
that it is about the file format instead of the tag.
NOT: This is only a change in the user interface. Internally the hash key is
still called "noAPE".

Then I changes the regex in _parse_ReplayGain as already discussed:
|    return undef unless defined($gain);
|    if($gain =~ /(.*?)\s*dB$/) {

I also changed a regex further down:
|    return undef unless ($gain =~ /^\s*-?\d+(\.\d+)?\s*$/);

This is a little more strict as it will not allow stuff like "-4." or
"15.". I.e. if there is a dot, it insists on finding at least one digit
after the dot.

I tested it with an mp3 that contains a TXXX tag with replay_gain_track 
and replay_gain_album where converted to soundcheck attribute as expected.

I'll add the version check in autoconf.ac for MP3::Info before I commit
the change though.

cheers
-henrik





reply via email to

[Prev in Thread] Current Thread [Next in Thread]