Various tweaks to the bundle manager.
[ardour.git] / libs / ardour / export_timespan.cc
index 14273d835f2d8b4b2e119e5e3c259da3e750e0fa..d638c84b16b1bd096104bcbcd50c01d2354b874f 100644 (file)
 
 */
 
-#include <ardour/export_timespan.h>
+#include "ardour/export_timespan.h"
 
-#include <ardour/export_channel_configuration.h>
-#include <ardour/export_filename.h>
-#include <ardour/export_file_io.h>
-#include <ardour/export_failed.h>
+#include "ardour/export_channel_configuration.h"
+#include "ardour/export_filename.h"
+#include "ardour/export_file_io.h"
+#include "ardour/export_failed.h"
 
 namespace ARDOUR
 {
 
-ExportTimespan::ExportTimespan (ExportStatus & status, nframes_t frame_rate) :
+ExportTimespan::ExportTimespan (ExportStatusPtr status, nframes_t frame_rate) :
   status (status),
   start_frame (0),
   end_frame (0),
@@ -42,7 +42,7 @@ ExportTimespan::~ExportTimespan ()
 }
 
 void
-ExportTimespan::register_channel (ExportChannel const & channel)
+ExportTimespan::register_channel (ExportChannelPtr channel)
 {
        TempFilePtr ptr (new ExportTempFile (1, frame_rate));
        ChannelFilePair pair (channel, ptr);
@@ -58,13 +58,13 @@ ExportTimespan::rewind ()
 }
 
 nframes_t
-ExportTimespan::get_data (float * data, nframes_t frames, ExportChannel const & channel)
+ExportTimespan::get_data (float * data, nframes_t frames, ExportChannelPtr channel)
 {
        TempFileMap::iterator it = filemap.find (channel);
        if (it == filemap.end()) {
-               throw ExportFailed (_("Export failed due to programming error"), _("Trying to get data from ExportTimespan for channel that was never registered!"));
+               throw ExportFailed (X_("Trying to get data from ExportTimespan for channel that was never registered!"));
        }
-       
+
        return it->second->read (data, frames);
 }
 
@@ -79,31 +79,31 @@ ExportTimespan::set_range (nframes_t start, nframes_t end)
 int
 ExportTimespan::process (nframes_t frames)
 {
-       status.stage = export_ReadTimespan;
+       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;
+               status->stop = true;
        }
-       
+
        position += frames_to_read;
-       status.progress = (float) (position - start_frame) / (end_frame - start_frame);
+       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_ports (data, frames_to_read);
+               it->first->read (data, frames_to_read);
                it->second->write (data, frames_to_read);
        }
-       
+
        delete [] data;
 
        return 0;