diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-10-03 11:39:36 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-10-03 13:13:58 -0400 |
commit | 4ef45aacc15c131170420341fab3439aefb72545 (patch) | |
tree | 774922078ec812eca390e4962f40bd5ffe96094c /libs | |
parent | 13765d41e34bf062a423c2d85bc4950c2002d916 (diff) |
add DeviceType specifier for mackie devices.
Incomplete, because we need a way to handle multiple devices of different types
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaces/mackie/device_info.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/surfaces/mackie/device_info.cc b/libs/surfaces/mackie/device_info.cc index ea488cd244..eef6d928c6 100644 --- a/libs/surfaces/mackie/device_info.cc +++ b/libs/surfaces/mackie/device_info.cc @@ -215,6 +215,28 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */) return -1; } + /* Device type ought to be mandatory but early versions missed it */ + if ((child = node.child ("DeviceType")) != 0) { + if ((prop = child->property ("value")) != 0) { + if (prop->value() == X_("MCU")) { + _device_type = MCU; + } else if (prop->value() == X_("MCXT")) { + _device_type = MCXT; + } else if (prop->value() == X_("LC")) { + _device_type = LC; + } else if (prop->value() == X_("LCXT")) { + _device_type = LCXT; + } else if (prop->value() == X_("HUI")) { + _device_type = HUI; + } else { + error << string_compose (_("Unknown Mackie device type \"%1\" used in device info file, using MCU instead"), prop->value()) << endmsg; + _device_type = MCU; + } + } else { + _device_type = MCU; + } + } + /* name is mandatory */ if ((child = node.child ("Name")) != 0) { if ((prop = child->property ("value")) != 0) { |