I'm trying to run this sox command to mix several audio inputs from my program using:
String command = "sox C:/serverFolder/a1.wav -p pad 0 0 | sox - -m C:/serverFolder/a2.wav -p pad 10.0 0 | sox - -m C:/serverFolder/a3.wav -p pad 0 0 | sox - -m C:/serverFolder/a4.wav -p pad 20.0 0 | sox - -m -v 0 C:/serverFolder/blank.wav C:/serverFolder/audioFile.wav";
Process proc = Runtime.getRuntime().exec(command);
I get
sox FAIL pad: usage: {length[@position]}
if I run this command into my cmd it runs fine. I tried several approaches like the one suggested here with the List: Using Java's ProcessBuilder to run SoX
Or the one suggested here using the absolute path to sox Running Sox commands from Java code
Since the code runs fine in cmd I'm guessing I'm sending it in a bad way from java. Any thoughts?