summaryrefslogtreecommitdiff
path: root/libs/ardour/export_timespan.cc
diff options
context:
space:
mode:
authorSakari Bergen <sakari.bergen@beatwaves.net>2009-12-27 14:46:23 +0000
committerSakari Bergen <sakari.bergen@beatwaves.net>2009-12-27 14:46:23 +0000
commitdde0848a984e06cbc1d4117d9cffa75c191f3b39 (patch)
tree11f3a5fe94ac792e753297e16e4e80dd7e296aea /libs/ardour/export_timespan.cc
parent35c72a53b4c6bbc61b4b86db9de629e18362b48d (diff)
Re-integrate export-optimization branch.
Export now happens directly to file (unless normalizing is required), and can be easily optimized even further. The Session process connection is still broken during export (as it was before this commit also). git-svn-id: svn://localhost/ardour2/branches/3.0@6401 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/export_timespan.cc')
-rw-r--r--libs/ardour/export_timespan.cc62
1 files changed, 0 insertions, 62 deletions
diff --git a/libs/ardour/export_timespan.cc b/libs/ardour/export_timespan.cc
index d638c84b16..948bf768d5 100644
--- a/libs/ardour/export_timespan.cc
+++ b/libs/ardour/export_timespan.cc
@@ -22,7 +22,6 @@
#include "ardour/export_channel_configuration.h"
#include "ardour/export_filename.h"
-#include "ardour/export_file_io.h"
#include "ardour/export_failed.h"
namespace ARDOUR
@@ -42,33 +41,6 @@ ExportTimespan::~ExportTimespan ()
}
void
-ExportTimespan::register_channel (ExportChannelPtr channel)
-{
- TempFilePtr ptr (new ExportTempFile (1, frame_rate));
- ChannelFilePair pair (channel, ptr);
- filemap.insert (pair);
-}
-
-void
-ExportTimespan::rewind ()
-{
- for (TempFileMap::iterator it = filemap.begin(); it != filemap.end(); ++it) {
- it->second->reset_read ();
- }
-}
-
-nframes_t
-ExportTimespan::get_data (float * data, nframes_t frames, ExportChannelPtr channel)
-{
- TempFileMap::iterator it = filemap.find (channel);
- if (it == filemap.end()) {
- throw ExportFailed (X_("Trying to get data from ExportTimespan for channel that was never registered!"));
- }
-
- return it->second->read (data, frames);
-}
-
-void
ExportTimespan::set_range (nframes_t start, nframes_t end)
{
start_frame = start;
@@ -76,38 +48,4 @@ ExportTimespan::set_range (nframes_t start, nframes_t end)
end_frame = end;
}
-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;
-}
-
-
} // namespace ARDOUR