add: current->stop_request_rep++;
context: static void eca_jack_sync_start_live_seek_to(jack_transport_state_t state, jack_position_t *pos, void *arg){  AUDIO_IO_JACK_MANAGER* current = static_cast<AUDIO_IO_JACK_MANAGER*>(arg);  SAMPLE_SPECS::sample_pos_t enginepos = current->engine_repp->current_position_in_samples();  if (current->is_running() != true) {    /* transport rolling: engine not started; start it now */    if (current->engine_repp->status() != ECA_ENGINE::engine_status_finished &&	((pos->frame <=	  current->engine_repp->connected_chainsetup()->length_in_samples()) ||	 (current->engine_repp->is_finite_length() != true))) {      /* conditions when we should start the engine        *  a. engine status not finished, AND...       *   a.1. transport position not beyond csetup length, OR...       *   a.2. csetup has infinite length       */      if (current->engine_repp->is_prepared() == true && 	  (enginepos == pos->frame)) {	current->engine_repp->start_operation();	DEBUG_CFLOW_STATEMENT(cerr << "eca_jack_FORCESYNC: Starting engine (direct)\n");      }      else {	current->engine_repp->command(ECA_ENGINE::ep_start, 0.0f);	DEBUG_CFLOW_STATEMENT(cerr << "eca_jack_FORCESYNC: Starting engine (cmdpipe)\n");	enginepos = -1;      }    }  }  else {    DEBUG_CFLOW_STATEMENT(cerr << endl << "eca_jack_FORCESYNC:  engine curpos '" << 			  current->engine_repp->current_position_in_samples() << 			  "' doesn't match JACK curpos '" << 			  pos->frame << "'!" << endl);    if ((pos->frame >= current->engine_repp->connected_chainsetup()->length_in_samples() &&	 (current->engine_repp->is_finite_length() == true))) {      DEBUG_CFLOW_STATEMENT(cerr << endl <<			    "eca_jack_FORCESYNC: over max length" << endl);      current->engine_repp->command(ECA_ENGINE::ep_stop, 0.0f);    }    else if (current->jackslave_seekahead_target_rep == -1 ||	     current->jackslave_seekahead_target_rep < 	     static_cast<long int>(pos->frame + current->buffersize()) ||	     current->jackslave_seekahead_target_rep - current->jackslave_seekahead_rep * current->buffersize() >	     static_cast<long int>(pos->frame + current->buffersize())) {      /* note: we use seek-ahead to give time for the disk	 i/o subsystem to catch up for the next round, seek-ahead 	 must be re-initialized if...	 a) seek-ahead target not set,	 b) we have missed the current seek-ahead target, or	 c) transport position has been rewinded (current seek-ahead target	 too far in the fututre)      */      if (current->jackslave_seekahead_target_rep != -1) {	/* previous seek has failed; try again with a longer look-ahead */	current->jackslave_seekahead_rep = 	  (current->jackslave_seekahead_rep < (65536 / current->buffersize()) ?	   current->jackslave_seekahead_rep * 2 : (65536 / current->buffersize()));	DEBUG_CFLOW_STATEMENT(cerr << "eca_jack_FORCESYNC: seek-ahead request failed; increasing seek-ahead to "			      << current->jackslave_seekahead_rep << endl);      }      current->jackslave_seekahead_target_rep = pos->frame + 	current->jackslave_seekahead_rep * current->buffersize();      current->engine_repp->command(ECA_ENGINE::ep_setpos_live_samples, 				    current->jackslave_seekahead_target_rep);      DEBUG_CFLOW_STATEMENT(cerr << "eca_jack_FORCESYNC: seek-ahead request sent; seeking to "			    << current->jackslave_seekahead_target_rep << endl);    }    else {      /* engine is already seeking to a new pos */      DEBUG_CFLOW_STATEMENT(cerr << endl 			    << "eca_jack_FORCESYNC:  seek to new pos underway; " 			    << pos->frame			    << " is transport-curpos." <<  endl);    }  }}