aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-04-10 15:08:18 -0400
committerB. Watson <urchlay@slackware.uk>2024-04-10 15:08:18 -0400
commit3860ddc4d7f9f6a618b31fdcd72a2dd70786a2ec (patch)
tree0bc1aac306f2a4308b325d5bdc18b3fb8cc2b37a
parenta29aab82be167ff2cc01d0a0090ee5d599faa000 (diff)
downloadmisc-scripts-3860ddc4d7f9f6a618b31fdcd72a2dd70786a2ec.tar.gz
soxdial: add some verbose message for bluebox.
-rwxr-xr-xsoxdial9
1 files changed, 6 insertions, 3 deletions
diff --git a/soxdial b/soxdial
index f86bd72..c9869a8 100755
--- a/soxdial
+++ b/soxdial
@@ -11,7 +11,7 @@ $|++;
=head1 NAME
-soxdial - generate DTMF (touchtone) audio
+soxdial - generate DTMF (touchtone or blue box) audio
=head1 SYNOPSIS
@@ -20,8 +20,8 @@ B<soxdial> [I<global-options>] [ [I<dial-options>] [I<dial-string>] ... ]
=head1 DESCRIPTION
B<soxdial> uses B<sox>(1) to generate DTMF tones (aka touchtone
-dialling). Output can be played through the system sound card, or
-saved to a file of any type supported by sox.
+dialling) and/or "blue box" tones. Output can be played through the
+system sound card, or saved to a file of any type supported by sox.
By default, letters are accepted and converted to numbers, according
to the layout of a touchtone phone (e.g. A = 2, M = 6, etc). If the
@@ -392,6 +392,7 @@ sub add_bluebox_digit {
$time += $digittime;
$time += $intertime;
+ warn "$SELF: added bluebox digit '$d', time now $time\n" if $verbose;
}
# ( sox -n -p synth 2 sine 350 sine 440; sox -n -p synth 2 sine 697 sine 1209 ) | sox -G -p -d
@@ -645,9 +646,11 @@ for ($argc = 0; $argc < @ARGV; $argc++) {
$bluebox = 1;
$digittime = $intertime = 0.06;
$randomize = 0;
+ warn "$SELF: bluebox mode enabled.\n" if $verbose;
} elsif(/^--?(?:N|normal)$/) {
$bluebox = 0;
($digittime, $intertime, $randomize) = @oldsettings if @oldsettings;
+ warn "$SELF: bluebox mode disabled (touchtone enabled).\n" if $verbose;
} else {
$_ = lc $_;
if($verbose && (/^--?[a-z]/i)) {