C++ (Qt)void MainWindow::on_pushButton_begin_clicked(){QProcess process;QStringList strListKey;strListKey << "track01.wav track02.wav result.wav"; process.start(QDir::currentPath() + "/SoX-Sound_eXchange/sox.exe", strListKey);process.waitForFinished(-1);}
C++ (Qt)strListKey << "track01.wav track02.wav result.wav";
C++ (Qt)strListKey << "track01.wav" << "track02.wav" << "result.wav";
C++ (Qt)while(!asleep()) sheep++;
strListKey << "track01.wav track02.wav result.wav";
C++ (Qt)void MainWindow::on_pushButton_clicked(){ QProcess process; QStringList strList; process.start("D://Programing//Sox//sox.exe", strList); process.waitForReadyRead(-1); QString strWrite = "track01.wav track02.wav Sometrack03.wav\n"; process.write(strWrite.toLatin1()); process.waitForBytesWritten(); process.waitForReadyRead(); qDebug() << "Text " << process.readAll() <<endl;}
C++ (Qt)#include <QMainWindow>#include <QApplication>#include <QProcess>#include <qDebug> // https://sourceforge.net/projects/sox/ - ссылка где скачал Sox - Sound eXchangeint main(int argc, char *argv[]){ QApplication a(argc, argv); QMainWindow w; QProcess process; QStringList strList; process.start("D://FolderSox//sox-14-4-2//sox", strList); process.waitForReadyRead(-1); QString strWrite = "track01.wav track02.wav Sometrack03.wav"; process.write(strWrite.toLatin1()); process.waitForBytesWritten(); process.waitForReadyRead(); qDebug() << "Text " << process.readAll() <<endl; // QProcess process; // Так тоже не работает// QStringList strList;// strList << "track01.wav";// strList << "track02.wav";// strList << "Sometrack03.wav";// process.start("D://FolderSox//sox-14-4-2//sox.exe", strList);// qDebug() << "Text2 " << process.exitCode() <<endl; w.show(); return a.exec();}
C++ (Qt)QString strWrite = "D://FolderSox//sox_14_4_2//track01.wav D://FolderSox//sox_14_4_2//track02.wav D://FolderSox//sox_14_4_2//Sometrack03.wav"; // Такой вариант не срабатывает
C++ (Qt)int main(int argc, char *argv[]){ QCoreApplication app(argc, argv); QProcess process; QStringList strList = { "F:/chimes.wav", "F:/chord.wav", "F:/result.wav" }; process.start("F:/sox/sox", strList); if(!process.waitForStarted()) { return 1; } if(!process.waitForFinished()) { return 2; } return 0;}
C++ (Qt)int main(int argc, char *argv[]){ QCoreApplication app(argc, argv); QProcess process; QStringList strList; strList << "D:/track01.wav" << "D:/track02.wav" << "D:/result03.wav"; process.start("D:/FolderSox/sox_14_4_2/sox.exe", strList); if(!process.waitForStarted()) { return 1; } if(!process.waitForFinished()) { return 2; } return 0;}