MCP: rename ports again, remove ports from MCP bundles, wakeup devices
git-svn-id: svn://localhost/ardour2/branches/3.0@11947 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
436196f58f
commit
5ee1aaf8d0
@ -517,8 +517,15 @@ MackieControlProtocol::set_device (const string& device_name)
|
|||||||
void
|
void
|
||||||
MackieControlProtocol::create_surfaces ()
|
MackieControlProtocol::create_surfaces ()
|
||||||
{
|
{
|
||||||
string device_name = X_("MC Main");
|
string device_name;
|
||||||
surface_type_t stype = mcu;
|
surface_type_t stype = mcu;
|
||||||
|
char buf[128];
|
||||||
|
|
||||||
|
if (_device_info.extenders() == 0) {
|
||||||
|
device_name = X_("mackie control");
|
||||||
|
} else {
|
||||||
|
device_name = X_("mackie control #1");
|
||||||
|
}
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Create %1 surfaces\n", 1 + _device_info.extenders()));
|
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Create %1 surfaces\n", 1 + _device_info.extenders()));
|
||||||
|
|
||||||
@ -529,7 +536,12 @@ MackieControlProtocol::create_surfaces ()
|
|||||||
|
|
||||||
/* next device will be an extender */
|
/* next device will be an extender */
|
||||||
|
|
||||||
device_name = X_("MC Extender");
|
if (_device_info.extenders() < 2) {
|
||||||
|
device_name = X_("mackie control #2");
|
||||||
|
} else {
|
||||||
|
snprintf (buf, sizeof (buf), X_("mackie control #%d"), n+2);
|
||||||
|
device_name = buf;
|
||||||
|
}
|
||||||
stype = ext;
|
stype = ext;
|
||||||
|
|
||||||
_input_bundle->add_channel (
|
_input_bundle->add_channel (
|
||||||
@ -1087,6 +1099,9 @@ MackieControlProtocol::midi_input_handler (IOCondition ioc, MIDI::Port* port)
|
|||||||
void
|
void
|
||||||
MackieControlProtocol::clear_ports ()
|
MackieControlProtocol::clear_ports ()
|
||||||
{
|
{
|
||||||
|
_input_bundle->remove_channels ();
|
||||||
|
_output_bundle->remove_channels ();
|
||||||
|
|
||||||
for (PortSources::iterator i = port_sources.begin(); i != port_sources.end(); ++i) {
|
for (PortSources::iterator i = port_sources.begin(); i != port_sources.end(); ++i) {
|
||||||
g_source_destroy (*i);
|
g_source_destroy (*i);
|
||||||
g_source_unref (*i);
|
g_source_unref (*i);
|
||||||
|
@ -154,6 +154,17 @@ Surface::Surface (MackieControlProtocol& mcp, const std::string& device_name, ui
|
|||||||
|
|
||||||
connect_to_signals ();
|
connect_to_signals ();
|
||||||
|
|
||||||
|
/* wakey wakey */
|
||||||
|
|
||||||
|
MidiByteArray wakeup (7, MIDI::sysex, 0x00, 0x00, 0x66, 0x14, 0x00, MIDI::eox);
|
||||||
|
_port->write (wakeup);
|
||||||
|
wakeup[4] = 0x15; /* wakup Mackie XT */
|
||||||
|
_port->write (wakeup);
|
||||||
|
wakeup[4] = 0x10; /* wakupe Logic Control */
|
||||||
|
_port->write (wakeup);
|
||||||
|
wakeup[4] = 0x11; /* wakeup Logic Control XT */
|
||||||
|
_port->write (wakeup);
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::MackieControl, "Surface::init finish\n");
|
DEBUG_TRACE (DEBUG::MackieControl, "Surface::init finish\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user