add: ecaplay_initialized = 1;
context: static void initialize_chainsetup_for_playback(eci_handle_t* eci, const char* nexttrack){  const char* ret = NULL;  *eci = eci_init_r();  if (ecaplay_debuglevel != -1) {    char tmpbuf[32];    snprintf(tmpbuf, 32, "debug %d", ecaplay_debuglevel);    eci_command_r(*eci, tmpbuf);  }  eci_command_r(*eci, "cs-add ecaplay_chainsetup");  /* check that add succeeded */  eci_command_r(*eci, "cs-list");  if (eci_last_string_list_count_r(*eci) != 2) {    fprintf(stderr, "(ecaplay) Warning! Failed to add a new chainsetup.\n");  }  /* as this is a new chainsetup, we can assume that    * adding chains succeeds */  eci_command_r(*eci, "c-add ecaplay_chain");    add_input_to_chainsetup(*eci, nexttrack);  set_audio_format(*eci, ecaplay_audio_format);  if (ecaplay_output == NULL) {    eci_command_r(*eci, "ao-add-default");    /* check that add succeeded */    eci_command_r(*eci, "ao-list");    if (eci_last_string_list_count_r(*eci) != 1) {      fprintf(stderr, "(ecaplay) Warning! Failed to add default output.\n");    }  }  else {    int len = strlen("ao-add ") + strlen(ecaplay_output) + 1;    char* tmpbuf = (char*)malloc(len);    snprintf(tmpbuf, len, "ao-add %s", ecaplay_output);    eci_command_r(*eci, tmpbuf);    free(tmpbuf);  }  /* FIXME: add detection of consecutive errors */  eci_command_r(*eci, "cs-connect");  if (eci_error_r(*eci)) {    fprintf(stderr, "(ecaplay) Unable to play file '%s':\n%s\n", nexttrack, eci_last_error_r(*eci));  }  else {    eci_command_r(*eci, "cs-connected");    ret = eci_last_string_r(*eci);    if (strncmp(ret, "ecaplay_chainsetup", strlen("ecaplay_chainsetup")) != 0) {      fprintf(stderr, "(ecaplay) Error while playing file '%s' . Skipping...\n", nexttrack);    }    else {      printf("(ecaplay) Playing file '%s'.\n", nexttrack);      eci_command_r(*eci, "start");    }  }}