diff options
author | Sakari Bergen <sakari.bergen@beatwaves.net> | 2012-01-28 15:05:53 +0000 |
---|---|---|
committer | Sakari Bergen <sakari.bergen@beatwaves.net> | 2012-01-28 15:05:53 +0000 |
commit | ab8cea1d7c19fddc6b81a6ba4a303a00e4fdd93c (patch) | |
tree | ae02bf18efc30dcd7af7782ec434ac73b0641ddf /libs/ardour/export_channel_configuration.cc | |
parent | aaf418bd6fe178eea0c67e65693536b07fcf5932 (diff) |
Store Region export state in instant.xml (fixes #3935)
git-svn-id: svn://localhost/ardour2/branches/3.0@11376 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/export_channel_configuration.cc')
-rw-r--r-- | libs/ardour/export_channel_configuration.cc | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/libs/ardour/export_channel_configuration.cc b/libs/ardour/export_channel_configuration.cc index 31729e171b..9487d021b4 100644 --- a/libs/ardour/export_channel_configuration.cc +++ b/libs/ardour/export_channel_configuration.cc @@ -31,6 +31,7 @@ #include "ardour/audioengine.h" #include "pbd/convert.h" +#include "pbd/enumwriter.h" #include "pbd/pthread_utils.h" using namespace PBD; @@ -40,9 +41,10 @@ namespace ARDOUR /* ExportChannelConfiguration */ -ExportChannelConfiguration::ExportChannelConfiguration (Session & session) : - session (session), - split (false) +ExportChannelConfiguration::ExportChannelConfiguration (Session & session) + : session (session) + , split (false) + , region_type (RegionExportChannelFactory::None) { } @@ -56,6 +58,15 @@ ExportChannelConfiguration::get_state () root->add_property ("split", get_split() ? "true" : "false"); root->add_property ("channels", to_string (get_n_chans(), std::dec)); + switch (region_type) { + case RegionExportChannelFactory::None: + // Do nothing + break; + default: + root->add_property ("region-processing", enum_2_string (region_type)); + break; + } + uint32_t i = 1; for (ExportChannelConfiguration::ChannelList::const_iterator c_it = channels.begin(); c_it != channels.end(); ++c_it) { channel = root->add_child ("Channel"); @@ -79,6 +90,11 @@ ExportChannelConfiguration::set_state (const XMLNode & root) set_split (!prop->value().compare ("true")); } + if ((prop = root.property ("region-processing"))) { + set_region_processing_type ((RegionExportChannelFactory::Type) + string_2_enum (prop->value(), RegionExportChannelFactory::Type)); + } + XMLNodeList channels = root.children ("Channel"); for (XMLNodeList::iterator it = channels.begin(); it != channels.end(); ++it) { ExportChannelPtr channel (new PortExportChannel ()); |