change VCA number to signed.
Allows for more robust out-of-band (negative) value
This commit is contained in:
parent
b7a7c1bbd8
commit
b37ec38d86
@ -52,10 +52,10 @@ class LIBARDOUR_API VCA : public Stripable,
|
|||||||
public Monitorable,
|
public Monitorable,
|
||||||
public boost::enable_shared_from_this<VCA> {
|
public boost::enable_shared_from_this<VCA> {
|
||||||
public:
|
public:
|
||||||
VCA (Session& session, uint32_t num, const std::string& name);
|
VCA (Session& session, int32_t num, const std::string& name);
|
||||||
~VCA();
|
~VCA();
|
||||||
|
|
||||||
uint32_t number () const { return _number; }
|
int32_t number () const { return _number; }
|
||||||
|
|
||||||
int init ();
|
int init ();
|
||||||
XMLNode& get_state();
|
XMLNode& get_state();
|
||||||
@ -94,12 +94,12 @@ class LIBARDOUR_API VCA : public Stripable,
|
|||||||
MonitorState monitoring_state() const;
|
MonitorState monitoring_state() const;
|
||||||
|
|
||||||
static std::string default_name_template ();
|
static std::string default_name_template ();
|
||||||
static uint32_t next_vca_number ();
|
static int32_t next_vca_number ();
|
||||||
static std::string xml_node_name;
|
static std::string xml_node_name;
|
||||||
|
|
||||||
/* used by Session to save/restore the atomic counter */
|
/* used by Session to save/restore the atomic counter */
|
||||||
static uint32_t get_next_vca_number ();
|
static int32_t get_next_vca_number ();
|
||||||
static void set_next_vca_number (uint32_t);
|
static void set_next_vca_number (int32_t);
|
||||||
|
|
||||||
boost::shared_ptr<GainControl> gain_control() const { return _gain_control; }
|
boost::shared_ptr<GainControl> gain_control() const { return _gain_control; }
|
||||||
boost::shared_ptr<SoloControl> solo_control() const { return _solo_control; }
|
boost::shared_ptr<SoloControl> solo_control() const { return _solo_control; }
|
||||||
@ -142,14 +142,14 @@ class LIBARDOUR_API VCA : public Stripable,
|
|||||||
boost::shared_ptr<MonitorControl> monitoring_control() const { return boost::shared_ptr<MonitorControl>(); }
|
boost::shared_ptr<MonitorControl> monitoring_control() const { return boost::shared_ptr<MonitorControl>(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint32_t _number;
|
int32_t _number;
|
||||||
|
|
||||||
boost::shared_ptr<GainControl> _gain_control;
|
boost::shared_ptr<GainControl> _gain_control;
|
||||||
boost::shared_ptr<SoloControl> _solo_control;
|
boost::shared_ptr<SoloControl> _solo_control;
|
||||||
boost::shared_ptr<MuteControl> _mute_control;
|
boost::shared_ptr<MuteControl> _mute_control;
|
||||||
|
|
||||||
|
|
||||||
static uint32_t next_number;
|
static int32_t next_number;
|
||||||
static Glib::Threads::Mutex number_lock;
|
static Glib::Threads::Mutex number_lock;
|
||||||
|
|
||||||
void solo_target_going_away (boost::weak_ptr<Route>);
|
void solo_target_going_away (boost::weak_ptr<Route>);
|
||||||
|
@ -34,7 +34,7 @@ using namespace PBD;
|
|||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
Glib::Threads::Mutex VCA::number_lock;
|
Glib::Threads::Mutex VCA::number_lock;
|
||||||
uint32_t VCA::next_number = 1;
|
int32_t VCA::next_number = 1;
|
||||||
string VCA::xml_node_name (X_("VCA"));
|
string VCA::xml_node_name (X_("VCA"));
|
||||||
|
|
||||||
string
|
string
|
||||||
@ -43,7 +43,7 @@ VCA::default_name_template ()
|
|||||||
return _("VCA %n");
|
return _("VCA %n");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
int32_t
|
||||||
VCA::next_vca_number ()
|
VCA::next_vca_number ()
|
||||||
{
|
{
|
||||||
/* we could use atomic inc here, but elsewhere we need more complete
|
/* we could use atomic inc here, but elsewhere we need more complete
|
||||||
@ -54,20 +54,20 @@ VCA::next_vca_number ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
VCA::set_next_vca_number (uint32_t n)
|
VCA::set_next_vca_number (int32_t n)
|
||||||
{
|
{
|
||||||
Glib::Threads::Mutex::Lock lm (number_lock);
|
Glib::Threads::Mutex::Lock lm (number_lock);
|
||||||
next_number = n;
|
next_number = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
int32_t
|
||||||
VCA::get_next_vca_number ()
|
VCA::get_next_vca_number ()
|
||||||
{
|
{
|
||||||
Glib::Threads::Mutex::Lock lm (number_lock);
|
Glib::Threads::Mutex::Lock lm (number_lock);
|
||||||
return next_number;
|
return next_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
VCA::VCA (Session& s, uint32_t num, const string& name)
|
VCA::VCA (Session& s, int32_t num, const string& name)
|
||||||
: Stripable (s, name, PresentationInfo (num, PresentationInfo::VCA))
|
: Stripable (s, name, PresentationInfo (num, PresentationInfo::VCA))
|
||||||
, Muteable (s, name)
|
, Muteable (s, name)
|
||||||
, Automatable (s)
|
, Automatable (s)
|
||||||
|
Loading…
Reference in New Issue
Block a user