diff options
Diffstat (limited to 'abs/core-testing/tweaker/bin/twk_audio.pl')
-rwxr-xr-x | abs/core-testing/tweaker/bin/twk_audio.pl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/abs/core-testing/tweaker/bin/twk_audio.pl b/abs/core-testing/tweaker/bin/twk_audio.pl index eec7992..47a2415 100755 --- a/abs/core-testing/tweaker/bin/twk_audio.pl +++ b/abs/core-testing/tweaker/bin/twk_audio.pl @@ -110,9 +110,9 @@ sub implement_option { sub edit_mplayer_conf { my($option) = @_; # delete any old entries that Tweaker made, relevant to this particular edit - my $delete_old_tweaker_edits = "[ -e $mplayer_conf ] && sed -i '/^.*a[o,c].*=.*#TWEAKER/d' $mplayer_conf"; + my $delete_old_tweaker_edits = "[ -e $mplayer_conf ] && sed -i '/^.*a[o,c,f].*=.*#TWEAKER/d' $mplayer_conf && sed -i '/^speed.*=.*#TWEAKER/d' $mplayer_conf"; # comment out old entries that some other process may have made - my $comment_out_external_edits = "[ -e $mplayer_conf ] && sed -i 's/^\\(a[o,c].*=.*\\)/#\\1/g' $mplayer_conf"; + my $comment_out_external_edits = "[ -e $mplayer_conf ] && sed -i 's/^\\(a[o,c,f].*=.*\\)/#\\1/g' $mplayer_conf && sed -i 's/^\\(speed.*=.*\\)/#\\1/g' $mplayer_conf"; my $command1; my $command2=""; ($card, $device) = poll_for_digital_output_device; @@ -160,6 +160,14 @@ sub implement_option { } } } + # for all options + $command2 = "echo -e 'af=scaletempo=stride=30:overlap=.50:search=10 #TWEAKER\nspeed=1.0 #TWEAKER' >> $mplayer_conf"; + if (my $error = execute_shell_command($command2)) { + $logger->error("ERROR: $error"); + $logger->error("ERROR: Unable to implement option $option."); + exit(-1); + } + $logger->info("Edited $mplayer_conf for $option audio."); } |