+ samplepos_t const old = _start;
+ _start = s;
+
+ if (allow_beat_recompute) {
+ recompute_beat_from_samples (sub_num);
+ }
+
+ start_change = true;
+
+ if (is_session_range ()) {
+ Session::StartTimeChanged (old); /* EMIT SIGNAL */
+ AudioFileSource::set_header_position_offset (s);
+ }
+ }
+
+
+ if (e != _end) {
+
+ samplepos_t const old = _end;
+ _end = e;
+
+ if (allow_beat_recompute) {
+ recompute_beat_from_samples (sub_num);
+ }
+
+ end_change = true;
+
+ if (is_session_range()) {
+ Session::EndTimeChanged (old); /* EMIT SIGNAL */
+ }
+ }
+
+ assert (_end >= 0);
+ }
+
+ if (start_change && end_change) {
+ changed (this);
+ Changed ();
+ } else if (start_change) {
+ start_changed(this); /* EMIT SIGNAL */
+ StartChanged(); /* EMIT SIGNAL */
+ } else if (end_change) {
+ end_changed(this); /* EMIT SIGNAL */
+ EndChanged(); /* EMIT SIGNAL */
+ }
+
+ return 0;