static std::string default_name_template ();
static int next_vca_number ();
static std::string xml_node_name;
+
+ /* used by Session to save/restore the atomic counter */
+ static uint32_t get_next_vca_number ();
static void set_next_vca_number (uint32_t);
virtual boost::shared_ptr<GainControl> gain_control() const { return _gain_control; }
/* save the VCA counter */
- snprintf (buf, sizeof (buf), "%" PRIu32, VCA::next_vca_number());
+ snprintf (buf, sizeof (buf), "%" PRIu32, VCA::get_next_vca_number());
node->add_property ("vca-counter", buf);
/* various options */
g_atomic_int_set (&next_number, n);
}
+uint32_t
+VCA::get_next_vca_number ()
+{
+ return g_atomic_int_get (&next_number);
+}
+
VCA::VCA (Session& s, uint32_t num, const string& name)
: Stripable (s, name)
, Automatable (s)