-int
-ExportTimespan::process (nframes_t frames)
-{
- status->stage = export_ReadTimespan;
-
- /* update position */
-
- nframes_t frames_to_read;
-
- if (position + frames <= end_frame) {
- frames_to_read = frames;
- } else {
- frames_to_read = end_frame - position;
- status->stop = true;
- }
-
- position += frames_to_read;
- status->progress = (float) (position - start_frame) / (end_frame - start_frame);
-
- /* Read channels from ports and save to tempfiles */
-
- float * data = new float[frames_to_read];
-
- for (TempFileMap::iterator it = filemap.begin(); it != filemap.end(); ++it) {
- it->first->read (data, frames_to_read);
- it->second->write (data, frames_to_read);
- }
-
- delete [] data;
-
- return 0;
-}
-
-