diff options
-rwxr-xr-x | soxdial | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -407,8 +407,9 @@ sub add_bluebox_digit { # --norm is needed because otherwise, the volume decreases as the number of # digits (tones for "synth") goes up. --norm=-3 helps avoid clipping. sub make_sox_subcmd { + my $length = shift || $digittime; my $cmd = "sox -n -b$bits $encoding -r$rate -c1 -traw - --norm=-3 "; - my $synth = " synth $digittime "; + my $synth = " synth $length "; my $delay = "delay "; for(0..$#freqs1) { @@ -654,8 +655,10 @@ for ($argc = 0; $argc < @ARGV; $argc++) { } warn "$SELF: start dial string '$_'\n" if $verbose; + my $time_override; if($bluebox) { if(/^(?:st[23]?|kp2?)/) { + $time_override = 0.1 if $_ eq 'kp' || $_ eq 'kp2'; add_bluebox_digit($_); } else { add_bluebox_digit($_) for split "", $_; @@ -672,7 +675,7 @@ for ($argc = 0; $argc < @ARGV; $argc++) { add_digit($digit); } } - push @sox_subcmds, make_sox_subcmd(); + push @sox_subcmds, make_sox_subcmd($time_override); push @sox_subcmds, silence_subcmd(randomize($intertime)); warn "$SELF: end dial string '$_'\n" if $verbose; |