summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorSakari Bergen <sakari.bergen@beatwaves.net>2009-12-27 22:09:40 +0000
committerSakari Bergen <sakari.bergen@beatwaves.net>2009-12-27 22:09:40 +0000
commit8da27200d18fe4c471a759dde8e10d85ff29d277 (patch)
tree8a68123da7cb8539a9818704363e3fd98da4d385 /libs/ardour/ardour
parentdde0848a984e06cbc1d4117d9cffa75c191f3b39 (diff)
- Fix process callbakc handling during export
- Fix filename handling when exporting multiple files - Some updates to audiographer git-svn-id: svn://localhost/ardour2/branches/3.0@6402 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/export_graph_builder.h7
-rw-r--r--libs/ardour/ardour/export_handler.h6
-rw-r--r--libs/ardour/ardour/session.h3
3 files changed, 11 insertions, 5 deletions
diff --git a/libs/ardour/ardour/export_graph_builder.h b/libs/ardour/ardour/export_graph_builder.h
index 1244afd647..2f57aaf583 100644
--- a/libs/ardour/ardour/export_graph_builder.h
+++ b/libs/ardour/ardour/export_graph_builder.h
@@ -62,6 +62,7 @@ class ExportGraphBuilder
~ExportGraphBuilder ();
int process (nframes_t frames, bool last_cycle);
+ bool process_normalize (); // returns true when finished
void reset ();
void add_config (FileSpec const & config);
@@ -124,6 +125,9 @@ class ExportGraphBuilder
void add_child (FileSpec const & new_config);
bool operator== (FileSpec const & other_config) const;
+ /// Returns true when finished
+ bool process ();
+
private:
typedef boost::shared_ptr<AudioGrapher::PeakReader> PeakReaderPtr;
typedef boost::shared_ptr<AudioGrapher::Normalizer> NormalizerPtr;
@@ -132,7 +136,6 @@ class ExportGraphBuilder
typedef boost::shared_ptr<AudioGrapher::AllocatingProcessContext<Sample> > BufferPtr;
void start_post_processing();
- void do_post_processing();
ExportGraphBuilder & parent;
@@ -217,6 +220,8 @@ class ExportGraphBuilder
Sample * process_buffer;
nframes_t process_buffer_frames;
+ std::list<Normalizer *> normalizers;
+
Glib::ThreadPool thread_pool;
};
diff --git a/libs/ardour/ardour/export_handler.h b/libs/ardour/ardour/export_handler.h
index f7f3b863b9..971c0c4940 100644
--- a/libs/ardour/ardour/export_handler.h
+++ b/libs/ardour/ardour/export_handler.h
@@ -112,17 +112,21 @@ class ExportHandler : public ExportElementFactory
private:
+ int process (nframes_t frames);
+
Session & session;
GraphBuilderPtr graph_builder;
StatusPtr export_status;
ConfigMap config_map;
bool realtime;
+ bool normalizing;
/* Timespan management */
void start_timespan ();
int process_timespan (nframes_t frames);
+ int process_normalize ();
void finish_timespan ();
typedef std::pair<ConfigMap::iterator, ConfigMap::iterator> TimespanBounds;
@@ -131,8 +135,6 @@ class ExportHandler : public ExportElementFactory
PBD::ScopedConnection process_connection;
sframes_t process_position;
-
- PBD::ScopedConnection export_read_finished_connection;
/* CD Marker stuff */
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index ae9c1f58a5..b72822bd1c 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -530,7 +530,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
int start_audio_export (nframes_t position, bool realtime);
PBD::Signal1<int,nframes_t> ProcessExport;
- PBD::Signal0<void> ExportReadFinished;
static PBD::Signal2<void,std::string, std::string> Exported;
void add_source (boost::shared_ptr<Source>);
@@ -934,7 +933,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
nframes_t post_export_position;
bool _exporting;
- bool _exporting_realtime;
+ bool _export_rolling;
boost::shared_ptr<ExportHandler> export_handler;
boost::shared_ptr<ExportStatus> export_status;