summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-05-16 11:08:32 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:42 -0400
commitd5127001bb60a8648a277f77e9ae4e8fd5943c9a (patch)
tree993c959fa7737b1e5e63870928e72e41ae7e5d0a /libs/ardour/ardour
parent52d4cea712b09cff9536bd5f4c8bb465281480de (diff)
move ControllableDescriptor from libpbd to libardour; add support for describing VCAs
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/controllable_descriptor.h93
-rw-r--r--libs/ardour/ardour/session.h4
-rw-r--r--libs/ardour/ardour/stripable.h3
3 files changed, 95 insertions, 5 deletions
diff --git a/libs/ardour/ardour/controllable_descriptor.h b/libs/ardour/ardour/controllable_descriptor.h
new file mode 100644
index 0000000000..1d647ff648
--- /dev/null
+++ b/libs/ardour/ardour/controllable_descriptor.h
@@ -0,0 +1,93 @@
+/*
+ Copyright (C) 2009 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef __libardour_controllable_descriptor_h__
+#define __libardour_controllable_descriptor_h__
+
+#include <vector>
+#include <string>
+#include <stdint.h>
+
+#include "ardour/libardour_visibility.h"
+
+namespace ARDOUR {
+
+class LIBARDOUR_API ControllableDescriptor {
+public:
+ enum TopLevelType {
+ PresentationOrderRoute,
+ PresentationOrderVCA,
+ NamedRoute,
+ SelectionCount,
+ };
+
+ enum SubType {
+ Gain,
+ Trim,
+ Solo,
+ Mute,
+ Recenable,
+ PanDirection,
+ PanWidth,
+ PanElevation,
+ Balance,
+ SendGain,
+ PluginParameter
+ };
+
+ ControllableDescriptor ()
+ : _top_level_type (PresentationOrderRoute)
+ , _subtype (Gain)
+ , _banked (false)
+ , _bank_offset (0)
+ {}
+
+ int set (const std::string&);
+
+ /* it is only valid to call top_level_name() if top_level_type() returns
+ NamedRoute
+ */
+
+ TopLevelType top_level_type() const { return _top_level_type; }
+ const std::string& top_level_name() const { return _top_level_name; }
+
+ SubType subtype() const { return _subtype; }
+
+ uint32_t presentation_order() const;
+ uint32_t selection_id() const;
+ uint32_t target (uint32_t n) const;
+ bool banked() const { return _banked; }
+
+ void set_bank_offset (uint32_t o) { _bank_offset = o; }
+
+private:
+ TopLevelType _top_level_type;
+ SubType _subtype;
+ std::string _top_level_name;
+ union {
+ uint32_t _presentation_order;
+ uint32_t _selection_id;
+ };
+ std::vector<uint32_t> _target;
+ uint32_t _banked;
+ uint32_t _bank_offset;
+};
+
+}
+
+#endif /* __libardour_controllable_descriptor_h__ */
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index f3a11a953c..0dcad54b6c 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -88,7 +88,6 @@ class Parser;
namespace PBD {
class Controllable;
-class ControllableDescriptor;
}
namespace luabridge {
@@ -114,6 +113,7 @@ class BufferSet;
class Bundle;
class Butler;
class Click;
+class ControllableDescriptor;
class Diskstream;
class ExportHandler;
class ExportStatus;
@@ -988,7 +988,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
boost::shared_ptr<Processor> processor_by_id (PBD::ID) const;
boost::shared_ptr<PBD::Controllable> controllable_by_id (const PBD::ID&);
- boost::shared_ptr<PBD::Controllable> controllable_by_descriptor (const PBD::ControllableDescriptor&);
+ boost::shared_ptr<PBD::Controllable> controllable_by_descriptor (const ARDOUR::ControllableDescriptor&);
void add_controllable (boost::shared_ptr<PBD::Controllable>);
void remove_controllable (PBD::Controllable*);
diff --git a/libs/ardour/ardour/stripable.h b/libs/ardour/ardour/stripable.h
index 1b82397074..274a0109dc 100644
--- a/libs/ardour/ardour/stripable.h
+++ b/libs/ardour/ardour/stripable.h
@@ -183,9 +183,6 @@ class LIBARDOUR_API Stripable : public SessionObject {
void set_presentation_info_explicit (PresentationInfo);
void add_state (XMLNode&) const;
-
- private:
- void set_presentation_info_internal (PresentationInfo id, bool notify_class_listeners = true);
};
struct PresentationInfoSorter {