aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsoxdial24
1 files changed, 15 insertions, 9 deletions
diff --git a/soxdial b/soxdial
index 39fbb53..a836fb8 100755
--- a/soxdial
+++ b/soxdial
@@ -495,13 +495,15 @@ sub set_dialtone_type {
# final sox command, to which we pipe all the others.
sub make_sox_cmd {
- # support quotes, spaces, etc in filenames.
- # this can probably be fooled by a determined luser.
- $output =~ s,",\\",g;
- $output = "\"$output\"";
-
- if($output !~ /\./) {
- $output = "-t raw $output";
+ if($output ne '-d') {
+ # support quotes, spaces, etc in filenames.
+ # this can probably be fooled by a determined luser.
+ $output =~ s,",\\",g;
+ $output = "\"$output\"";
+
+ if($output !~ /\./) {
+ $output = "-t raw $output";
+ }
}
my $ch = $stereo ? "channels 2" : "";
@@ -706,8 +708,12 @@ for ($argc = 0; $argc < @ARGV; $argc++) {
add_digit($digit);
}
}
- push @sox_subcmds, make_sox_subcmd($time_override);
- push @sox_subcmds, silence_subcmd(randomize($intertime));
+ if(@freqs1) {
+ push @sox_subcmds, make_sox_subcmd($time_override);
+ push @sox_subcmds, silence_subcmd(randomize($intertime));
+ } else {
+ warn "$SELF: no valid digits in dial string.\n" if $verbose;
+ }
warn "$SELF: end dial string '$_'\n" if $verbose;
}