+ /* we wrote something */
+
+ const framepos_t pos = 0;
+ const double length_beats = ceil(t / (double)source->ppqn());
+ BeatsFramesConverter converter(smfs->session().tempo_map(), pos);
+ smfs->update_length(pos + converter.to(length_beats));
+ smfs->mark_streaming_write_completed ();
+
+ if (status.cancel) {
+ break;
+ }
+ } else {
+ warning << string_compose (_("Track %1 of %2 contained no usable MIDI data"), i, source->file_path()) << endmsg;
+ }
+
+ ++s; // next source