| 1 |
From: Gunnar Wolf <[email protected]> |
| 2 |
Origin: vendor |
| 3 |
Bug-Debian: http://bugs.debian.org/397071 |
| 4 |
Forwarded: yes (private mail) |
| 5 |
Last-Update: 2010-02-19 |
| 6 |
Description: Add --no-normalize flag to override --normalize |
| 7 |
Per user request, as --normalize was not overridable if specified in |
| 8 |
the configuration file |
| 9 |
--- mp3roaster-0.3.0.orig/mp3roaster |
| 10 |
+++ mp3roaster-0.3.0/mp3roaster |
| 11 |
@@ -62,6 +62,7 @@ GetOptions ( |
| 12 |
'opt_check_quotes|quotes|q', |
| 13 |
'opt_check_questions|questions|Q', |
| 14 |
'opt_wav_normalize|normalize|n', |
| 15 |
+ 'opt_wav_no_normalize|no-normalize|N', |
| 16 |
|
| 17 |
'verbose|v', |
| 18 |
'help|h', |
| 19 |
@@ -97,6 +98,7 @@ Options: |
| 20 |
-q, --quotes Replace quotes with underscores. |
| 21 |
-Q, --questions Replace questionmarks with underscores. |
| 22 |
-n, --normalize Normalize WAV files before burning. |
| 23 |
+ -N, --no-normalize Don\'t normalize WAV files (useful to override config) |
| 24 |
-v, --verbose Enable verbose output. |
| 25 |
-h, --help Show this help screen. |
| 26 |
-V, --version Show program version. |
| 27 |
@@ -238,6 +240,7 @@ sub read_config_file_and_options { |
| 28 |
my $config_check_quotes; |
| 29 |
my $config_check_questions; |
| 30 |
my $config_wav_normalize; |
| 31 |
+ my $config_wav_no_normalize; |
| 32 |
|
| 33 |
# This options MUST be defined in the configuration file |
| 34 |
# or MUST be passed to the program as a command line option |
| 35 |
@@ -255,7 +258,8 @@ sub read_config_file_and_options { |
| 36 |
"config_check_brackets" => \$config_check_brackets, |
| 37 |
"config_check_quotes" => \$config_check_quotes, |
| 38 |
"config_check_questions" => \$config_check_questions, |
| 39 |
- "config_wav_normalize" => \$config_wav_normalize |
| 40 |
+ "config_wav_normalize" => \$config_wav_normalize, |
| 41 |
+ "config_wav_no_normalize" => \$config_wav_no_normalize |
| 42 |
); |
| 43 |
|
| 44 |
open('RC', $in_config_file_location); # open file |
| 45 |
@@ -332,6 +336,14 @@ sub read_config_file_and_options { |
| 46 |
} |
| 47 |
}; |
| 48 |
|
| 49 |
+ # Allow for overriding config_wav_normalize with |
| 50 |
+ # config_wav_no_normalize: If both are set, no_normalize wins. |
| 51 |
+ if ($confhash{config_wav_no_normalize} and |
| 52 |
+ delete($confhash{config_wav_normalize}) and |
| 53 |
+ $opthash{verbose}) { |
| 54 |
+ print " * no-normalize is set and overrides normalize\n"; |
| 55 |
+ } |
| 56 |
+ |
| 57 |
return %confhash; |
| 58 |
} |
| 59 |
|
| 60 |
@@ -1378,6 +1390,11 @@ Replace questionmarks with underscores |
| 61 |
|
| 62 |
Normalize WAV files before burning |
| 63 |
|
| 64 |
+=item B<-N, --no-normalize> |
| 65 |
+ |
| 66 |
+Don't normalize WAV files, even if --normalize is specified (either as |
| 67 |
+a command line argument or in the configuratino file) |
| 68 |
+ |
| 69 |
=item B<-v, --verbose> |
| 70 |
|
| 71 |
Enable verbose output |