13
0

MCP: probably fix issues with vpots not working

git-svn-id: svn://localhost/ardour2/branches/3.0@11979 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-04-15 14:30:03 +00:00
parent 2926372b75
commit 97c2832d35
3 changed files with 4 additions and 2 deletions

View File

@ -24,7 +24,8 @@
using namespace Mackie;
int const Pot::External = 0x2e;
int const Pot::External = 0x2e; /* specific ID for "vpot" representing external control */
int const Pot::ID = 0x10; /* base value for v-pot IDs */
Control*
Pot::factory (Surface& surface, int id, const char* name, Group& group)

View File

@ -28,6 +28,7 @@ class Pot : public Control
{
public:
static int const External;
static int const ID;
enum Mode {
dot = 0,

View File

@ -77,7 +77,7 @@ Strip::Strip (Surface& s, const std::string& name, int index, const map<Button::
, _last_pan_position_written (-1.0)
{
_fader = dynamic_cast<Fader*> (Fader::factory (*_surface, index, "fader", *this));
_vpot = dynamic_cast<Pot*> (Pot::factory (*_surface, index, "vpot", *this));
_vpot = dynamic_cast<Pot*> (Pot::factory (*_surface, Pot::ID + index, "vpot", *this));
_meter = dynamic_cast<Meter*> (Meter::factory (*_surface, index, "meter", *this));
for (map<Button::ID,StripButtonInfo>::const_iterator b = strip_buttons.begin(); b != strip_buttons.end(); ++b) {