summaryrefslogtreecommitdiff
path: root/libs/ardour/export_channel_configuration.cc
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2016-08-27 23:27:21 +1000
committerTim Mayberry <mojofunk@gmail.com>2017-04-19 09:36:51 +1000
commit964297b9533d11743c0be36390e06a6f8c07f9d6 (patch)
treede369e32cea528bf22299c23abf9fcbe670275cd /libs/ardour/export_channel_configuration.cc
parent113f1e762238ef61a2bcf4f3762883127fecfd0e (diff)
Use XMLNode::get/set_property API in ARDOUR::ExportChannelConfiguration
Diffstat (limited to 'libs/ardour/export_channel_configuration.cc')
-rw-r--r--libs/ardour/export_channel_configuration.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/ardour/export_channel_configuration.cc b/libs/ardour/export_channel_configuration.cc
index 77b56272d6..90c44abf64 100644
--- a/libs/ardour/export_channel_configuration.cc
+++ b/libs/ardour/export_channel_configuration.cc
@@ -45,15 +45,15 @@ ExportChannelConfiguration::get_state ()
XMLNode * root = new XMLNode ("ExportChannelConfiguration");
XMLNode * channel;
- root->add_property ("split", get_split() ? "true" : "false");
- root->add_property ("channels", to_string (get_n_chans(), std::dec));
+ root->set_property ("split", get_split());
+ root->set_property ("channels", get_n_chans());
switch (region_type) {
case RegionExportChannelFactory::None:
// Do nothing
break;
default:
- root->add_property ("region-processing", enum_2_string (region_type));
+ root->set_property ("region-processing", enum_2_string (region_type));
break;
}
@@ -62,7 +62,7 @@ ExportChannelConfiguration::get_state ()
channel = root->add_child ("Channel");
if (!channel) { continue; }
- channel->add_property ("number", to_string (i, std::dec));
+ channel->set_property ("number", i);
(*c_it)->get_state (channel);
++i;
@@ -74,15 +74,15 @@ ExportChannelConfiguration::get_state ()
int
ExportChannelConfiguration::set_state (const XMLNode & root)
{
- XMLProperty const * prop;
-
- if ((prop = root.property ("split"))) {
- set_split (!prop->value().compare ("true"));
+ bool yn;
+ if (root.get_property ("split", yn)) {
+ set_split (yn);
}
- if ((prop = root.property ("region-processing"))) {
+ std::string str;
+ if (root.get_property ("region-processing", str)) {
set_region_processing_type ((RegionExportChannelFactory::Type)
- string_2_enum (prop->value(), RegionExportChannelFactory::Type));
+ string_2_enum (str, RegionExportChannelFactory::Type));
}
XMLNodeList channels = root.children ("Channel");