+void
+ResampledImportableSource::seek (framepos_t pos)
+{
+ source->seek (pos);
+
+ /* and reset things so that we start from scratch with the conversion */
+
+ if (src_state) {
+ src_delete (src_state);
+ }
+
+ int err;
+
+ if ((src_state = src_new (_src_type, source->channels(), &err)) == 0) {
+ error << string_compose(_("Import: src_new() failed : %1"), src_strerror (err)) << endmsg ;
+ throw failed_constructor ();
+ }
+
+ src_data.input_frames = 0;
+ src_data.data_in = input;
+ src_data.end_of_input = 0;
+}
+
+framepos_t
+ResampledImportableSource::natural_position () const
+{
+ return source->natural_position() * ratio ();
+}