diff options
author | Robin Gareus <robin@gareus.org> | 2016-04-12 13:49:50 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-04-12 13:49:50 +0200 |
commit | 29543a5dcdf020012be5a5c18201367eeb4dd206 (patch) | |
tree | 56284d49d70c76a9cd0095268d71aec5977550a2 /libs/ardour/ardour/session.h | |
parent | f5e4d3b0326dfc95c0a513c79cb8b3d84ea37800 (diff) |
add a new counter (for sidechain numbering)
Diffstat (limited to 'libs/ardour/ardour/session.h')
-rw-r--r-- | libs/ardour/ardour/session.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index c9d2de4d07..9f8102c928 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -186,6 +186,12 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop static int get_info_from_path (const std::string& xmlpath, float& sample_rate, SampleFormat& data_format); static std::string get_snapshot_from_instant (const std::string& session_dir); + /** a monotonic counter used for naming user-visible things uniquely + * (curently the sidechain port). + * Use sparingly to keep the numbers low, prefer PBD::ID for all + * internal, not user-visible IDs */ + static unsigned int next_name_id (); + std::string path() const { return _path; } std::string name() const { return _name; } std::string snap_name() const { return _current_snapshot_name; } @@ -1098,6 +1104,10 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop int create (const std::string& mix_template, BusProfile*); void destroy (); + static guint _name_id_counter; + static void init_name_id_counter (guint n); + static unsigned int name_id_counter (); + enum SubState { PendingDeclickIn = 0x1, ///< pending de-click fade-in for start PendingDeclickOut = 0x2, ///< pending de-click fade-out for stop |