diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2018-06-21 13:05:37 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2018-06-21 13:05:58 -0400 |
commit | 8a18929d57ef82b1233278668a9efe78fe1c17f0 (patch) | |
tree | 41dd4f8bb487f6a570987c04c7601dae9ca3edf9 /libs/ardour/ardour | |
parent | 637e70749cf32331df4d09b56f3c819f42f8097e (diff) |
remove Session::controllable_by_descriptor() and move code into GenericMIDI code (the only user).
This also removes enums introduced to describe well-known parameters for Mixbus. Lookup now involves string
parsing every time, but this is not likely to be a notable cost.
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/controllable_descriptor.h | 82 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/types.h | 20 |
3 files changed, 0 insertions, 104 deletions
diff --git a/libs/ardour/ardour/controllable_descriptor.h b/libs/ardour/ardour/controllable_descriptor.h deleted file mode 100644 index af762473a9..0000000000 --- a/libs/ardour/ardour/controllable_descriptor.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - 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" -#include "ardour/types.h" - -namespace ARDOUR { - -class LIBARDOUR_API ControllableDescriptor { -public: - enum TopLevelType { - PresentationOrderRoute, - PresentationOrderTrack, - PresentationOrderBus, - PresentationOrderVCA, - NamedRoute, - SelectionCount, - }; - - ControllableDescriptor () - : _top_level_type (PresentationOrderRoute) - , _subtype (GainAutomation) - , _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; } - - AutomationType 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; - AutomationType _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 4cf725ae2f..835e6668bc 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -116,7 +116,6 @@ class BufferSet; class Bundle; class Butler; class Click; -class ControllableDescriptor; class CoreSelection; class ExportHandler; class ExportStatus; @@ -1082,7 +1081,6 @@ public: boost::shared_ptr<PBD::Controllable> controllable_by_id (const PBD::ID&); boost::shared_ptr<AutomationControl> automation_control_by_id (const PBD::ID&); - 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/types.h b/libs/ardour/ardour/types.h index ed6ba96617..a3af7e2c3d 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -158,26 +158,6 @@ namespace ARDOUR { SendLevelAutomation, SendEnableAutomation, SendAzimuthAutomation, - - /* these describe "well known" controls of a Stripable that are - covered by the types above. They should be used only as part - of ControllableDescriptor - */ - - EQEnableAutomation, - EQGainAutomation, - EQFreqAutomation, - EQQAutomation, - EQShapeAutomation, - FilterFreqAutomation, - FilterSlopeAutomation, - FilterEnableAutomation, - CompressorEnableAutomation, - CompressorThresholdAutomation, - CompressorSpeedAutomation, - CompressorModeAutomation, - CompressorMakeupAutomation, - /* Redux not included because it is read-only */ }; enum AutoState { |