I am having a problem when running lame as a QProcess.
I have tried using the standard method of placing the commandline params in a QStringList but have moved onto a plain line of text to simplify things for now.
Qt Code:
  1. QProcess * lame = new QProcess(this);
  2.  
  3. connect(lame, SIGNAL(readyReadStandardOutput()), this, SLOT(lameDataAvailable()));
  4. connect(lame, SIGNAL(readyReadStandardError()), this, SLOT(lameErrorAvailable()));
  5. connect(lame, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(lameFinished(int, QProcess::ExitStatus)));
  6.  
  7. QString tmp = "lame \"-b 112\" \"-m j\" -f \"-V 2\" \"-B 320\" \"" + inFile + "\" \"" + outFile + "\"";
  8.  
  9. lame->start(tmp);
To copy to clipboard, switch view to plain text mode 
lame reports this...
lame: -m mode must be s/d/j/f/m not j

if I remove the space between the -m and j thus.. -mj then lame accepts it.

But if I put a --lowpass 18 in the string then lame says it is an unrecognised switch.

But if I use all and any of the lame switches in a terminal they are always accepted okay.

I am running Lame version 3.97 but the problem was the same with an earlier version.

After numerous tests I have come to the conclusion that it is something to do with an environment setting for the QProcess.
I tried setting a TERM=xterm environment setting but it doesn't make any difference.

Does anyone have any idea about what is happening?
Thanks