diff options
author | B. Watson <urchlay@slackware.uk> | 2024-04-08 02:59:47 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-04-08 02:59:47 -0400 |
commit | 005d1ddcb66028d86b8a8ab2a04dc7ce69bf296b (patch) | |
tree | 68e5417f08dacc5efa619d6c425cea3f64763c5b | |
parent | 0df96700a00a0bd9740c30d42cd9a5dc280fbdf1 (diff) | |
download | misc-scripts-005d1ddcb66028d86b8a8ab2a04dc7ce69bf296b.tar.gz |
soxdial: tweak doc, die if sox not found on $PATH.
-rwxr-xr-x | soxdial | 24 |
1 files changed, 18 insertions, 6 deletions
@@ -157,14 +157,17 @@ ignored. This allows you to paste a phone number in the form B<(555) =head1 NOTES -B<1.> B<soxdial> works by iterating over the words on the command line, -and building up an array of B<sox> commands for each dial string or -segment of dial tone. At the end, all the B<sox> commands are run +B<1.> B<soxdial> works by iterating over the words on the command +line, and building up an array of B<sox> commands for each dial string +or segment of dial tone. At the end, all the B<sox> commands are run and their combined output (as raw samples) is piped to another B<sox> 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<sox> 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<sox> doesn't allow multiple B<synth> +arguments in the same command (or, it does, but they don't work as +expected, or at all). Because the final B<sox> 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 <urchlay@slackware.uk> 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; |