- /* no SRC, keep it simple */
-
- to_write = nframes;
- leftover_frames = 0;
- float_buffer = dataF;
- }
-
- if (output_data) {
- memset (output_data, 0, sample_bytes * to_write * channels);
- }
-
- switch (data_width) {
- case 8:
- case 16:
- case 24:
- for (chn = 0; chn < channels; ++chn) {
- gdither_runf (dither, chn, to_write, float_buffer, output_data);
- }
- break;
-
- case 32:
- for (chn = 0; chn < channels; ++chn) {
-
- int *ob = (int *) output_data;
- const double int_max = (float) INT_MAX;
- const double int_min = (float) INT_MIN;
-
- for (x = 0; x < to_write; ++x) {
- i = chn + (x * channels);
-
- if (float_buffer[i] > 1.0f) {
- ob[i] = INT_MAX;
- } else if (float_buffer[i] < -1.0f) {
- ob[i] = INT_MIN;
- } else {
- if (float_buffer[i] >= 0.0f) {
- ob[i] = lrintf (int_max * float_buffer[i]);
- } else {
- ob[i] = - lrintf (int_min * float_buffer[i]);
- }
- }
- }
- }
- break;
-
- default:
- for (x = 0; x < to_write * channels; ++x) {
- if (float_buffer[x] > 1.0f) {
- float_buffer[x] = 1.0f;
- } else if (float_buffer[x] < -1.0f) {
- float_buffer[x] = -1.0f;
- }
+ {
+ boost::shared_ptr<RouteList> rl = routes.reader();
+
+ for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
+ boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
+ if (tr && tr->seek (position, true)) {
+ error << string_compose (_("%1: cannot seek to %2 for export"),
+ (*i)->name(), position)
+ << endmsg;
+ return -1;