launch() not running all parameters or not running at all

launch() does not seem to be passing all parameters to lame.exe. As you can see in the comments, one version ignores the quality settings (not useful). The other versions don't even run.

String mode;
float Vnumber;
String pathToLame;

void setup() {
  size(200, 200);
  mode = "m";
  Vnumber = 0;
  pathToLame = dataPath("lame.exe");
}

void draw() { 
  // draw() must be present for mousePressed() to work
}

void mousePressed() {

  \\ignores "-q 0 -p -m m -V 5"
  String[] params = { pathToLame, "-q 0 -p -m m -V 5", "C:\\Users\\Avis\\Desktop\\test2.wav", "C:\\Users\\Avis\\Desktop\\test5.mp3" };

  \\doesn't even run...
  String[] params = { pathToLame, "-q 0", "-p", "-m m", "-V 5", "C:\\Users\\Avis\\Desktop\\test2.wav", "C:\\Users\\Avis\\Desktop\\test5.mp3" };

 \\ also doesn't run...
 String[] params = { pathToLame, "-q 0 -p -m m -V 5 C:\\Users\\Avis\\Desktop\\test4.wav C:\\Users\\Avis\\Desktop\\test4.mp3" };
  launch(params);
  println(params);
}

Answers

  • Answer ✓

    you might need to quote every single parameter ie

    String[] params = { pathToLame, "-q", "0", "-p", "-m", "m", "-V", "5", "C:\\Users\\Avis\\Desktop\\test2.wav", "C:\\Users\\Avis\\Desktop\\test5.mp3" };
    
  • That did it! Here comes the best podcast encoder, for encoding dummies, ever!

Sign In or Register to comment.