aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-04-07 16:13:41 -0400
committerB. Watson <urchlay@slackware.uk>2024-04-11 16:52:47 -0400
commit3a3603dd0b645a62755f8beb906e618254a6269c (patch)
tree21e9aed064c76e4187222a9d20c861b308414396
parent6c9ec673bb3d9b95bacc375542efcb237b5f1ce3 (diff)
downloadsoxdial-3a3603dd0b645a62755f8beb906e618254a6269c.tar.gz
soxdial: wip.
-rwxr-xr-xsoxdial8
1 files changed, 7 insertions, 1 deletions
diff --git a/soxdial b/soxdial
index 7f123c2..29a66ee 100755
--- a/soxdial
+++ b/soxdial
@@ -191,6 +191,10 @@ sub letter2number {
# sox -n -d synth 0.25 sine 697 sine 1209 sine 770 sine 1477 delay 0 0 .35 .35 remix -
# ...plays DTMF 1 and 6, for 0.25 sec each, with a 0.10 sec delay between them.
+# ( sox -n -p synth 2 sine 350 sine 440; sox -n -p synth 2 sine 697 sine 1209 ) | sox -G -p -d
+# ...plays 2 sec of dialtone followed by 2 sec of DTMF key 1. Change the -d
+# to 1.wav to save to a file. Prefix it with -rXXXX -sX if needed.
+
sub add_digit {
my $d = shift;
if($d eq ',') {
@@ -212,7 +216,7 @@ sub add_digit {
$time += $digittime;
$time += $intertime;
}
- warn "$SELF: added digit '$d', time now $time\n";
+ warn "$SELF: added digit '$d', time now $time\n" if $verbose;
}
sub make_sox_cmd {
@@ -290,6 +294,7 @@ for ($argc = 0; $argc < @ARGV; $argc++) {
} elsif(/^--?(?:t|dialtone)$/) {
die "$SELF: -t/--dialtone option not yet implemented.\n";
} else {
+ warn "$SELF: start dial string '$_'\n" if $verbose;
for (split "", $_) {
my $digit = uc $_;
if($extended) {
@@ -300,6 +305,7 @@ for ($argc = 0; $argc < @ARGV; $argc++) {
}
add_digit($digit);
}
+ warn "$SELF: end dial string '$_'\n" if $verbose;
}
}