From d70857b2da60cf8b898d4ffa138e1026f50cbce2 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 29 Aug 2007 06:14:45 +0000 Subject: [PATCH] Voice generation: Don't call lame twice, and make the command echo work for all encoders. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14501 a1c6a512-1295-4272-9138-f99709370657 --- tools/voice.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/voice.pl b/tools/voice.pl index 1635b701f1..109451f82e 100755 --- a/tools/voice.pl +++ b/tools/voice.pl @@ -189,21 +189,21 @@ sub voicestring { sub encodewav { our $verbose; my ($input, $output, $encoder, $encoder_opts) = @_; + my $cmd = ''; printf("Encode \"%s\" with %s in file %s\n", $input, $encoder, $output) if $verbose; switch ($encoder) { case 'lame' { - my $cmd = "lame $encoder_opts \"$input\" \"$output\""; - print("> $cmd\n") if $verbose; - `lame $encoder_opts "$input" "$output"`; - `$cmd`; + $cmd = "lame $encoder_opts \"$input\" \"$output\""; } case 'vorbis' { - `oggenc $encoder_opts "$input" -o "$output"`; + $cmd = "oggenc $encoder_opts \"$input\" -o \"$output\""; } case 'speexenc' { - `speexenc $encoder_opts "$input" "$output"`; + $cmd = "speexenc $encoder_opts \"$input\" \"$output\""; } } + print("> $cmd\n") if $verbose; + `$cmd`; } sub wavtrim {