aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-04-10 16:21:18 -0400
committerB. Watson <urchlay@slackware.uk>2024-04-11 16:52:48 -0400
commit86a6bb43dec14a63f722818f72c855807832fef4 (patch)
tree249c9f544e6ff6c69beb2e2f104bf89c9864afbd
parenta1a99bd8c9f9a57f0fcece26c4aa3181aab4b985 (diff)
downloadsoxdial-86a6bb43dec14a63f722818f72c855807832fef4.tar.gz
soxdial: do not play anything for a dial string if there are no valid digits.
-rwxr-xr-xsoxdial2
1 files changed, 2 insertions, 0 deletions
diff --git a/soxdial b/soxdial
index e445d55..7726c8a 100755
--- a/soxdial
+++ b/soxdial
@@ -430,6 +430,8 @@ 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 {
+ return ":" unless @freqs1;
+
my $length = shift || $digittime;
my $cmd = "sox -n -b$bits $encoding -r$rate -c1 -traw - --norm=-3 ";
my $synth = " synth $length ";