summaryrefslogtreecommitdiff
path: root/libs/ardour/export_graph_builder.cc
diff options
context:
space:
mode:
authorSakari Bergen <sakari.bergen@beatwaves.net>2010-03-30 15:25:28 +0000
committerSakari Bergen <sakari.bergen@beatwaves.net>2010-03-30 15:25:28 +0000
commita743d20dce499f3b6f1418967e200beaa670b375 (patch)
tree4a9c98ea8d4d18a17c701942ffd3b5db1bf34164 /libs/ardour/export_graph_builder.cc
parent14b0ca31bcb62e5b7e9e77634ef9cd2e8cf65800 (diff)
Fix split channel export (which was broken during export refactoring)
Possibly fixes bug #3052 Also clarify some comments which weren't quite clear :) git-svn-id: svn://localhost/ardour2/branches/3.0@6808 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/export_graph_builder.cc')
-rw-r--r--libs/ardour/export_graph_builder.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/libs/ardour/export_graph_builder.cc b/libs/ardour/export_graph_builder.cc
index 738f888b3d..bc3a162e04 100644
--- a/libs/ardour/export_graph_builder.cc
+++ b/libs/ardour/export_graph_builder.cc
@@ -74,6 +74,33 @@ ExportGraphBuilder::reset ()
void
ExportGraphBuilder::add_config (FileSpec const & config)
{
+ if (!config.channel_config->get_split ()) {
+ add_split_config (config);
+ return;
+ }
+
+ // Split channel configurations are split into several channel configurations,
+ // each corresponding to a file, at this stage
+ typedef std::list<boost::shared_ptr<ExportChannelConfiguration> > ConfigList;
+ ConfigList file_configs;
+ config.channel_config->configurations_for_files (file_configs);
+
+ unsigned chan = 1;
+ for (ConfigList::iterator it = file_configs.begin(); it != file_configs.end(); ++it, ++chan) {
+ FileSpec copy = config;
+ copy.channel_config = *it;
+
+ copy.filename.reset (new ExportFilename (*copy.filename));
+ copy.filename->include_channel = true;
+ copy.filename->set_channel (chan);
+
+ add_split_config (copy);
+ }
+}
+
+void
+ExportGraphBuilder::add_split_config (FileSpec const & config)
+{
for (ChannelConfigList::iterator it = channel_configs.begin(); it != channel_configs.end(); ++it) {
if (*it == config) {
it->add_child (config);