- frames_read = timespan->get_data (channel_buffer, frames, *it);
-
- /* Interleave into file buffer */
-
- for (uint32_t i = 0; i < frames_read; ++i) {
- file_buffer[channel + (channel_count * i)] = channel_buffer[i];
- }
-
- ++channel;
- }
-
- progress += frames_read;
- status->progress = (float) progress / timespan_length;
-
- } while (processor->process (file_buffer, frames_read) > 0);
-
- delete [] channel_buffer;
- delete [] file_buffer;
-}
-
-void *
-ExportChannelConfiguration::_write_files (void *arg)
-{
- notify_gui_about_thread_creation (pthread_self(), "Export post-processing");
- SessionEvent::create_per_thread_pool ("exporter events", 64);
-
- // cc can be trated like 'this'
- WriterThread & cc (*((WriterThread *) arg));
-
- try {
- for (FileConfigList::iterator it = cc->file_configs.begin(); it != cc->file_configs.end(); ++it) {
- if (cc->status->aborted()) {
- break;
- }
- cc->processor->prepare (it->first, it->second, cc->channels.size(), cc->split, cc->timespan->get_start());
- cc->write_file (); // Writes tempfile
- cc->processor->prepare_post_processors ();
- cc->processor->write_files();
- }
- } catch (ExportFailed & e) {
- cc->status->abort (true);