From 005d1ddcb66028d86b8a8ab2a04dc7ce69bf296b Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 8 Apr 2024 02:59:47 -0400 Subject: soxdial: tweak doc, die if sox not found on $PATH. --- soxdial | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/soxdial b/soxdial index a8556b9..ea24b13 100755 --- a/soxdial +++ b/soxdial @@ -157,14 +157,17 @@ ignored. This allows you to paste a phone number in the form B<(555) =head1 NOTES -B<1.> B works by iterating over the words on the command line, -and building up an array of B commands for each dial string or -segment of dial tone. At the end, all the B commands are run +B<1.> B works by iterating over the words on the command +line, and building up an array of B commands for each dial string +or segment of dial tone. At the end, all the B commands are run and their combined output (as raw samples) is piped to another B command that writes the output as a single audio stream (raw, .wav, -or whatever format the B<-o>, B<--output> filename indicates). Because -the final B command reads only raw audio, it's impossible to -change the bitrate or sample size in between dial strings. +or whatever format the B<-o>, B<--output> filename indicates). It has +to be done this way because B doesn't allow multiple B +arguments in the same command (or, it does, but they don't work as +expected, or at all). Because the final B command reads only raw +audio, it's impossible to change the bitrate or sample size in between +dial strings. B<2.> If anything on the command line starts with B<-> but isn't a recognized option, it's not an error: it gets treated as a dial @@ -172,6 +175,11 @@ string. This allows e.g. I<555 -1212> to work correctly, but mistyped options will result in them being dialled as alphabetic characters. This may be a bit surprising the first time it happens. +B<3.> I haven't been able to test this with a real land-line phone to +see whether it will actually dial out. + +B<4.> Possibly there will be support for bluebox tones in the future. + =head1 AUTHOR soxdial was written by B. Watson and released @@ -335,6 +343,10 @@ sub parse_rate { } # main() +if(system("sox --version > /dev/null 2>&1") != 0) { + die "$SELF: can't execute sox, is it installed?\n"; +} + if(!@ARGV) { warn "$SELF: no dial strings. Try $SELF --help.\n"; exit 1; -- cgit v1.2.3