diff options
Diffstat (limited to 'soxdial')
-rwxr-xr-x | soxdial | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -430,6 +430,10 @@ sub parse_rate { return $_; } +sub check_stereo { + die "$SELF: can't enable stereo after a dial string.\n" if @sox_subcmds; +} + # main() if(system("sox --version > /dev/null 2>&1") != 0) { die "$SELF: can't execute sox, is it installed?\n"; @@ -508,11 +512,14 @@ for ($argc = 0; $argc < @ARGV; $argc++) { } elsif(/^--?s(?:ilence)?$/) { push @sox_subcmds, silence_subcmd(parse_sec($ARGV[++$argc])); } elsif(/^--?(?:S|stereo)$/) { + check_stereo(); $stereo = 1; } elsif(/^--?(?:L|left)$/) { + check_stereo(); $right = 0; $stereo = $left = 1; } elsif(/^--?(?:R|right)$/) { + check_stereo(); $left = 0; $stereo = $right = 1; } elsif(/^--?(?:X|random)$/) { |