projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NOOP, remove trailing tabs/whitespace.
[ardour.git]
/
libs
/
pbd
/
controllable_descriptor.cc
diff --git
a/libs/pbd/controllable_descriptor.cc
b/libs/pbd/controllable_descriptor.cc
index 9c930e4dbd89dcc9a00cd62babfeb5fb2f9b2972..0228d004e4984729e9b29ad736ccef8b8f6ab456 100644
(file)
--- a/
libs/pbd/controllable_descriptor.cc
+++ b/
libs/pbd/controllable_descriptor.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2009 Paul Davis
+ 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
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
@@
-35,14
+35,14
@@
ControllableDescriptor::set (const std::string& str)
string front = str.substr (0, first_space);
string back = str.substr (first_space);
string front = str.substr (0, first_space);
string back = str.substr (first_space);
- vector<string> path;
+ vector<string> path;
split (front, path, '/');
if (path.size() < 2) {
return -1;
}
split (front, path, '/');
if (path.size() < 2) {
return -1;
}
- vector<string> rest;
+ vector<string> rest;
split (back, rest, ' ');
if (rest.size() < 1) {
split (back, rest, ' ');
if (rest.size() < 1) {
@@
-72,6
+72,9
@@
ControllableDescriptor::set (const std::string& str)
if (path[1] == "gain") {
_subtype = Gain;
if (path[1] == "gain") {
_subtype = Gain;
+ } else if (path[1] == "trim") {
+ _subtype = Trim;
+
} else if (path[1] == "solo") {
_subtype = Solo;
} else if (path[1] == "solo") {
_subtype = Solo;
@@
-103,12
+106,11
@@
ControllableDescriptor::set (const std::string& str)
return -1;
}
} else if (path[1] == "send") {
return -1;
}
} else if (path[1] == "send") {
-
- if (path.size() == 3 && rest.size() ==
3
) {
+
+ if (path.size() == 3 && rest.size() ==
2
) {
if (path[2] == "gain") {
_subtype = SendGain;
_target.push_back (atoi (rest[1]));
if (path[2] == "gain") {
_subtype = SendGain;
_target.push_back (atoi (rest[1]));
- _target.push_back (atoi (rest[2]));
} else {
return -1;
}
} else {
return -1;
}
@@
-116,7
+118,7
@@
ControllableDescriptor::set (const std::string& str)
return -1;
}
}
return -1;
}
}
-
+
return 0;
}
return 0;
}
@@
-125,7
+127,7
@@
ControllableDescriptor::rid() const
{
if (banked()) {
return _rid + _bank_offset;
{
if (banked()) {
return _rid + _bank_offset;
- }
+ }
return _rid;
}
return _rid;
}
@@
-135,7
+137,7
@@
ControllableDescriptor::target (uint32_t n) const
{
if (n < _target.size()) {
return _target[n];
{
if (n < _target.size()) {
return _target[n];
- }
-
+ }
+
return 0;
}
return 0;
}