summaryrefslogtreecommitdiff
path: root/libs/surfaces/mackie/mackie_port.cc
diff options
context:
space:
mode:
authorJohn Anderson <ardour@semiosix.com>2007-03-09 20:46:46 +0000
committerJohn Anderson <ardour@semiosix.com>2007-03-09 20:46:46 +0000
commit7182cd75e367ad97f978827c1bf4f875b46c6776 (patch)
tree9f459271570fc2937af2234b861021b79e2484e0 /libs/surfaces/mackie/mackie_port.cc
parent765d0f4785d1bf6a82c7acc19eebdf851fc305a5 (diff)
Stop trying to talk to device on startup. Remap some bcf buttons.
git-svn-id: svn://localhost/ardour2/trunk@1568 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/mackie_port.cc')
-rw-r--r--libs/surfaces/mackie/mackie_port.cc53
1 files changed, 32 insertions, 21 deletions
diff --git a/libs/surfaces/mackie/mackie_port.cc b/libs/surfaces/mackie/mackie_port.cc
index 18232f40bb..23371c4d1f 100644
--- a/libs/surfaces/mackie/mackie_port.cc
+++ b/libs/surfaces/mackie/mackie_port.cc
@@ -233,26 +233,7 @@ void MackiePort::probe_emulation( const MidiByteArray & bytes )
return;
}
- // probing doesn't work very well, so just use a config variable
- // to set the emulation mode
- bool emulation_ok = false;
- if ( ARDOUR::Config->get_mackie_emulation() == "bcf" )
- {
- _emulation = bcf2000;
- emulation_ok = true;
- }
- else if ( ARDOUR::Config->get_mackie_emulation() == "mcu" )
- {
- _emulation = mackie;
- emulation_ok = true;
- }
- else
- {
- cout << "unknown mackie emulation: " << ARDOUR::Config->get_mackie_emulation() << endl;
- emulation_ok = false;
- }
-
- finalise_init( emulation_ok );
+ finalise_init( true );
}
void MackiePort::init()
@@ -266,12 +247,42 @@ void MackiePort::init()
init_event();
// kick off initialisation. See docs in header file for init()
- write_sysex ( MidiByteArray (2, 0x13, 0x00 ));
+
+ // bypass the init sequence because sometimes the first
+ // message doesn't get to the unit, and there's no way
+ // to do a timed lock in Glib.
+ //write_sysex ( MidiByteArray ( 2, 0x13, 0x00 ) );
+
+ finalise_init( true );
}
void MackiePort::finalise_init( bool yn )
{
cout << "MackiePort::finalise_init" << endl;
+ bool emulation_ok = false;
+
+ // probing doesn't work very well, so just use a config variable
+ // to set the emulation mode
+ if ( _emulation == none )
+ {
+ if ( ARDOUR::Config->get_mackie_emulation() == "bcf" )
+ {
+ _emulation = bcf2000;
+ emulation_ok = true;
+ }
+ else if ( ARDOUR::Config->get_mackie_emulation() == "mcu" )
+ {
+ _emulation = mackie;
+ emulation_ok = true;
+ }
+ else
+ {
+ cout << "unknown mackie emulation: " << ARDOUR::Config->get_mackie_emulation() << endl;
+ emulation_ok = false;
+ }
+ }
+
+ yn = yn && emulation_ok;
SurfacePort::active( yn );