rem: eci.command("cs-connect"); eci.command("cs-connected"); if (eci.last_string() != "default") { cerr << eci.last_error() << endl; cerr << "---\nError while converting file " << filename << ". Exiting...\n";
add: if (ecicpp_connect_chainsetup(&eci, "default") < 0) {
context: int main(int argc, char *argv[]){  COMMAND_LINE cline = COMMAND_LINE (argc, argv);  if (cline.size() < 2) {    print_usage();    return(1);  }  string filename;  ECA_CONTROL_INTERFACE eci;  cline.begin();  cline.next(); // skip the program name    string extension (".raw");  if (cline.end() != true) {    extension = cline.current();    cline.next();  }    while(cline.end() != true) {    filename = cline.current();        cout << "Converting file \"" << filename << "\" --> ";    cout << "\"" << filename + extension << "\"." << endl;        eci.command("cs-add default");    eci.command("c-add default");    string format;    if (ecicpp_add_input(&eci, filename, &format) < 0) break;        cout << "Using audio format -f:" << format << "\n";    if (ecicpp_add_output(&eci, filename + extension, format) < 0) break;    eci.command("cs-connect");    eci.command("cs-connected");    if (eci.last_string() != "default") {      cerr << eci.last_error() << endl;      cerr << "---\nError while converting file " << filename << ". Exiting...\n";      break;    }        cout << "Starting processing...\n";        // blocks until processing is done    eci.command("run");        cout << "Processing finished.\n";        eci.command("cs-disconnect");    eci.command("cs-select default");    eci.command("cs-remove");        cline.next();  }  return(0);}