summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/export_profile_manager.h13
-rw-r--r--libs/ardour/export_profile_manager.cc25
2 files changed, 33 insertions, 5 deletions
diff --git a/libs/ardour/ardour/export_profile_manager.h b/libs/ardour/ardour/export_profile_manager.h
index 31e93a5b89..82b32fb032 100644
--- a/libs/ardour/ardour/export_profile_manager.h
+++ b/libs/ardour/ardour/export_profile_manager.h
@@ -50,7 +50,15 @@ class ExportProfileManager
{
public:
- ExportProfileManager (Session & s, std::string xml_node_name);
+ enum ExportType {
+ RegularExport,
+ RangeExport,
+ SelectionExport,
+ RegionExport,
+ StemExport
+ };
+
+ ExportProfileManager (Session & s, ExportType type);
~ExportProfileManager ();
void load_profile ();
@@ -70,7 +78,8 @@ class ExportProfileManager
typedef std::pair<PBD::UUID, std::string> FilePair;
typedef std::map<PBD::UUID, std::string> FileMap;
- std::string const xml_node_name;
+ ExportType type;
+ std::string xml_node_name;
HandlerPtr handler;
Session & session;
diff --git a/libs/ardour/export_profile_manager.cc b/libs/ardour/export_profile_manager.cc
index af7f6a73f8..deeb3aea2b 100644
--- a/libs/ardour/export_profile_manager.cc
+++ b/libs/ardour/export_profile_manager.cc
@@ -56,8 +56,8 @@ using namespace PBD;
namespace ARDOUR
{
-ExportProfileManager::ExportProfileManager (Session & s, std::string xml_node_name)
- : xml_node_name (xml_node_name)
+ExportProfileManager::ExportProfileManager (Session & s, ExportType type)
+ : type(type)
, handler (s.get_export_handler())
, session (s)
@@ -67,6 +67,24 @@ ExportProfileManager::ExportProfileManager (Session & s, std::string xml_node_na
, format_list (new FormatList ())
{
+ switch(type) {
+ case RegularExport:
+ xml_node_name = X_("ExportProfile");
+ break;
+ case RangeExport:
+ xml_node_name = X_("RangeExportProfile");
+ break;
+ case SelectionExport:
+ xml_node_name = X_("SelectionExportProfile");
+ break;
+ case RegionExport:
+ xml_node_name = X_("RegionExportProfile");
+ break;
+ case StemExport:
+ xml_node_name = X_("StemExportProfile");
+ break;
+ }
+
/* Initialize path variables */
export_config_dir = Glib::build_filename (user_config_directory(), export_dir_name);
@@ -139,7 +157,8 @@ ExportProfileManager::prepare_for_export ()
}
// ...and each channel config
- filename->include_channel_config = (channel_configs.size() > 1);
+ filename->include_channel_config = (type == StemExport) ||
+ (channel_configs.size() > 1);
for(ChannelConfigStateList::iterator cc_it = channel_configs.begin(); cc_it != channel_configs.end(); ++cc_it) {
handler->add_export_config (*ts_it, (*cc_it)->config, (*format_it)->format, filename, b);
}