mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
Remove unusued API Create/Delete Binding
This commit is contained in:
parent
430e51065c
commit
9a1c22d7e1
4 changed files with 0 additions and 68 deletions
|
|
@ -32,8 +32,6 @@ using namespace std;
|
|||
PBD::Signal1<void,Controllable*> Controllable::Destroyed;
|
||||
PBD::Signal1<bool,Controllable*> Controllable::StartLearning;
|
||||
PBD::Signal1<void,Controllable*> Controllable::StopLearning;
|
||||
PBD::Signal3<void,Controllable*,int,int> Controllable::CreateBinding;
|
||||
PBD::Signal1<void,Controllable*> Controllable::DeleteBinding;
|
||||
PBD::Signal1<void, boost::weak_ptr<PBD::Controllable> > Controllable::GUIFocusChanged;
|
||||
|
||||
Glib::Threads::RWLock Controllable::registry_lock;
|
||||
|
|
|
|||
|
|
@ -122,8 +122,6 @@ public:
|
|||
virtual std::string get_user_string() const { return std::string(); }
|
||||
|
||||
PBD::Signal0<void> LearningFinished;
|
||||
static PBD::Signal3<void,PBD::Controllable*,int,int> CreateBinding;
|
||||
static PBD::Signal1<void,PBD::Controllable*> DeleteBinding;
|
||||
|
||||
static PBD::Signal1<bool,PBD::Controllable*> StartLearning;
|
||||
static PBD::Signal1<void,PBD::Controllable*> StopLearning;
|
||||
|
|
|
|||
|
|
@ -108,8 +108,6 @@ GenericMidiControlProtocol::GenericMidiControlProtocol (Session& s)
|
|||
|
||||
Controllable::StartLearning.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::start_learning, this, _1));
|
||||
Controllable::StopLearning.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::stop_learning, this, _1));
|
||||
Controllable::CreateBinding.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::create_binding, this, _1, _2, _3));
|
||||
Controllable::DeleteBinding.connect_same_thread (*this, boost::bind (&GenericMidiControlProtocol::delete_binding, this, _1));
|
||||
|
||||
/* this signal is emitted by the process() callback, and if
|
||||
* send_feedback() is going to do anything, it should do it in the
|
||||
|
|
@ -468,64 +466,6 @@ GenericMidiControlProtocol::stop_learning (Controllable* c)
|
|||
delete dptr;
|
||||
}
|
||||
|
||||
void
|
||||
GenericMidiControlProtocol::delete_binding (PBD::Controllable* control)
|
||||
{
|
||||
if (control != 0) {
|
||||
Glib::Threads::Mutex::Lock lm2 (controllables_lock);
|
||||
|
||||
for (MIDIControllables::iterator iter = controllables.begin(); iter != controllables.end();) {
|
||||
MIDIControllable* existingBinding = (*iter);
|
||||
|
||||
if (control == (existingBinding->get_controllable())) {
|
||||
delete existingBinding;
|
||||
iter = controllables.erase (iter);
|
||||
} else {
|
||||
++iter;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This next function seems unused
|
||||
void
|
||||
GenericMidiControlProtocol::create_binding (PBD::Controllable* control, int pos, int control_number)
|
||||
{
|
||||
if (control != NULL) {
|
||||
Glib::Threads::Mutex::Lock lm2 (controllables_lock);
|
||||
|
||||
MIDI::channel_t channel = (pos & 0xf);
|
||||
MIDI::byte value = control_number;
|
||||
|
||||
// Create a MIDIControllable
|
||||
MIDIControllable* mc = new MIDIControllable (this, *_input_port->parser(), *control, false);
|
||||
|
||||
// Remove any old binding for this midi channel/type/value pair
|
||||
// Note: can't use delete_binding() here because we don't know the specific controllable we want to remove, only the midi information
|
||||
for (MIDIControllables::iterator iter = controllables.begin(); iter != controllables.end();) {
|
||||
MIDIControllable* existingBinding = (*iter);
|
||||
|
||||
if ((existingBinding->get_control_channel() & 0xf ) == channel &&
|
||||
existingBinding->get_control_additional() == value &&
|
||||
(existingBinding->get_control_type() & 0xf0 ) == MIDI::controller) {
|
||||
|
||||
delete existingBinding;
|
||||
iter = controllables.erase (iter);
|
||||
} else {
|
||||
++iter;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Update the MIDI Controllable based on the the pos param
|
||||
// Here is where a table lookup for user mappings could go; for now we'll just wing it...
|
||||
mc->bind_midi(channel, MIDI::controller, value);
|
||||
DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("Create binding: Channel: %1 Controller: %2 Value: %3 \n", channel, MIDI::controller, value));
|
||||
controllables.push_back (mc);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
GenericMidiControlProtocol::check_used_event (int pos, int control_number)
|
||||
{
|
||||
|
|
@ -537,7 +477,6 @@ GenericMidiControlProtocol::check_used_event (int pos, int control_number)
|
|||
DEBUG_TRACE (DEBUG::GenericMidi, string_compose ("checking for used event: Channel: %1 Controller: %2 value: %3\n", (int) channel, (pos & 0xf0), (int) value));
|
||||
|
||||
// Remove any old binding for this midi channel/type/value pair
|
||||
// Note: can't use delete_binding() here because we don't know the specific controllable we want to remove, only the midi information
|
||||
for (MIDIControllables::iterator iter = controllables.begin(); iter != controllables.end();) {
|
||||
MIDIControllable* existingBinding = (*iter);
|
||||
if ( (existingBinding->get_control_type() & 0xf0 ) == (pos & 0xf0) && (existingBinding->get_control_channel() & 0xf ) == channel ) {
|
||||
|
|
|
|||
|
|
@ -152,9 +152,6 @@ class GenericMidiControlProtocol : public ARDOUR::ControlProtocol {
|
|||
|
||||
void learning_stopped (MIDIControllable*);
|
||||
|
||||
void create_binding (PBD::Controllable*, int, int);
|
||||
void delete_binding (PBD::Controllable*);
|
||||
|
||||
MIDIControllable* create_binding (const XMLNode&);
|
||||
MIDIFunction* create_function (const XMLNode&);
|
||||
MIDIAction* create_action (const XMLNode&);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue