- XMLNode& node (Region::state (full));
- XMLNode *child;
- char buf[64];
- char buf2[64];
- LocaleGuard lg (X_("POSIX"));
-
- snprintf (buf, sizeof (buf), "0x%x", (int) _flags);
- node.add_property ("flags", buf);
-
- for (uint32_t n=0; n < _sources.size(); ++n) {
- snprintf (buf2, sizeof(buf2), "source-%d", n);
- _sources[n]->id().print (buf);
- node.add_property (buf2, buf);
- }
-
- snprintf (buf, sizeof (buf), "%u", (uint32_t) _sources.size());
- node.add_property ("channels", buf);
-
- child = node.add_child ("Envelope");
-
- if ( ! full) {
- child->add_property ("default", "yes");
- }
-
- if (full && _extra_xml) {
- node.add_child_copy (*_extra_xml);
- }
-
- return node;