aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-04-11 15:05:05 -0400
committerB. Watson <urchlay@slackware.uk>2024-04-11 16:52:48 -0400
commit9fe2f8dcc56c9edbe1be04416911ec7938b5e9eb (patch)
tree8fa0d41c8b725adf18615ab7b71b8b048e8a53a4
parent141b196cfa597c90ec811173f296f9d52a47d73d (diff)
downloadsoxdial-9fe2f8dcc56c9edbe1be04416911ec7938b5e9eb.tar.gz
soxdial: support spaces in extensionless output filenames, too.
-rwxr-xr-xsoxdial13
1 files changed, 8 insertions, 5 deletions
diff --git a/soxdial b/soxdial
index 519e4dd..4127951 100755
--- a/soxdial
+++ b/soxdial
@@ -494,21 +494,24 @@ sub set_dialtone_type {
# final sox command, to which we pipe all the others.
sub make_sox_cmd {
+ # support quotes, spaces, etc in filenames.
+ # this can probably be fooled by a determined luser.
+ $output =~ s,",\\",g;
+ $output = "\"$output\"";
+
if($output !~ /\./) {
$output = "-t raw $output";
- } else {
- # support quotes, spaces, etc in filenames.
- # this can probably be fooled by a determined luser.
- $output =~ s,",\\",g;
- $output = "\"$output\"";
}
+
my $ch = $stereo ? "channels 2" : "";
+
my $remix = "";
if($left) {
$remix = "remix 1 1v0";
} elsif($right) {
$remix = "remix 1v0 1";
}
+
my $cmd = "sox -traw -b$bits $encoding -r$rate -c1 - $output $ch $remix";
my $subcmds = join(" ; ", @sox_subcmds);
return "( " . $subcmds . " ) | " . $cmd;