diff options
Diffstat (limited to 'libs/surfaces/mackie')
-rw-r--r-- | libs/surfaces/mackie/device_info.cc | 13 | ||||
-rw-r--r-- | libs/surfaces/mackie/device_profile.cc | 8 | ||||
-rw-r--r-- | libs/surfaces/mackie/interface.cc | 34 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 3 | ||||
-rw-r--r-- | libs/surfaces/mackie/wscript | 2 |
5 files changed, 29 insertions, 31 deletions
diff --git a/libs/surfaces/mackie/device_info.cc b/libs/surfaces/mackie/device_info.cc index 45fd2faebd..04cbfecc56 100644 --- a/libs/surfaces/mackie/device_info.cc +++ b/libs/surfaces/mackie/device_info.cc @@ -24,6 +24,7 @@ #include "pbd/xml++.h" #include "pbd/error.h" #include "pbd/pathscanner.h" +#include "pbd/convert.h" #include "ardour/filesystem_paths.h" @@ -221,7 +222,7 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */) /* strip count is mandatory */ if ((child = node.child ("Strips")) != 0) { if ((prop = child->property ("value")) != 0) { - if ((_strip_cnt = atoi (prop->value())) == 0) { + if ((_strip_cnt = atoi (prop->value().c_str())) == 0) { _strip_cnt = 8; } } @@ -231,7 +232,7 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */) if ((child = node.child ("Extenders")) != 0) { if ((prop = child->property ("value")) != 0) { - if ((_extenders = atoi (prop->value())) == 0) { + if ((_extenders = atoi (prop->value().c_str())) == 0) { _extenders = 0; } } @@ -441,7 +442,7 @@ static const char * const devinfo_env_variable_name = "ARDOUR_MCP_PATH"; static const char* const devinfo_dir_name = "mcp"; static const char* const devinfo_suffix = ".device"; -static SearchPath +static Searchpath devinfo_search_path () { bool devinfo_path_defined = false; @@ -451,14 +452,14 @@ devinfo_search_path () return spath_env; } - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(devinfo_dir_name); return spath; } static bool -devinfo_filter (const string &str, void */*arg*/) +devinfo_filter (const string &str, void* /*arg*/) { return (str.length() > strlen(devinfo_suffix) && str.find (devinfo_suffix) == (str.length() - strlen (devinfo_suffix))); @@ -471,7 +472,7 @@ DeviceInfo::reload_device_info () vector<string> s; vector<string *> *devinfos; PathScanner scanner; - SearchPath spath (devinfo_search_path()); + Searchpath spath (devinfo_search_path()); devinfos = scanner (spath.to_string(), devinfo_filter, 0, false, true); device_info.clear (); diff --git a/libs/surfaces/mackie/device_profile.cc b/libs/surfaces/mackie/device_profile.cc index ea57458e1c..ddbb4782db 100644 --- a/libs/surfaces/mackie/device_profile.cc +++ b/libs/surfaces/mackie/device_profile.cc @@ -55,7 +55,7 @@ static const char * const devprofile_env_variable_name = "ARDOUR_MCP_PATH"; static const char* const devprofile_dir_name = "mcp"; static const char* const devprofile_suffix = ".profile"; -static SearchPath +static Searchpath devprofile_search_path () { bool devprofile_path_defined = false; @@ -65,7 +65,7 @@ devprofile_search_path () return spath_env; } - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(devprofile_dir_name); return spath; @@ -78,7 +78,7 @@ user_devprofile_directory () } static bool -devprofile_filter (const string &str, void */*arg*/) +devprofile_filter (const string &str, void* /*arg*/) { return (str.length() > strlen(devprofile_suffix) && str.find (devprofile_suffix) == (str.length() - strlen (devprofile_suffix))); @@ -91,7 +91,7 @@ DeviceProfile::reload_device_profiles () vector<string> s; vector<string *> *devprofiles; PathScanner scanner; - SearchPath spath (devprofile_search_path()); + Searchpath spath (devprofile_search_path()); devprofiles = scanner (spath.to_string(), devprofile_filter, 0, false, true); device_profiles.clear (); diff --git a/libs/surfaces/mackie/interface.cc b/libs/surfaces/mackie/interface.cc index 294a222a6b..35216da263 100644 --- a/libs/surfaces/mackie/interface.cc +++ b/libs/surfaces/mackie/interface.cc @@ -29,7 +29,7 @@ using namespace ARDOUR; using namespace PBD; using namespace std; -ControlProtocol* +static ControlProtocol* new_mackie_protocol (ControlProtocolDescriptor*, Session* s) { MackieControlProtocol* mcp = 0; @@ -47,7 +47,7 @@ new_mackie_protocol (ControlProtocolDescriptor*, Session* s) return mcp; } -void +static void delete_mackie_protocol (ControlProtocolDescriptor*, ControlProtocol* cp) { try @@ -66,34 +66,28 @@ delete_mackie_protocol (ControlProtocolDescriptor*, ControlProtocol* cp) So anything that can be changed in the UI should not be used here to prevent loading of the lib. */ -bool +static bool probe_mackie_protocol (ControlProtocolDescriptor*) { return MackieControlProtocol::probe(); } +// Field names commented out by JE - 06-01-2010 static ControlProtocolDescriptor mackie_descriptor = { - name : "Mackie", - id : "uri://ardour.org/surfaces/mackie:0", - ptr : 0, - module : 0, - mandatory : 0, + /*name : */ "Mackie", + /*id : */ "uri://ardour.org/surfaces/mackie:0", + /*ptr : */ 0, + /*module : */ 0, + /*mandatory : */ 0, // actually, the surface does support feedback, but all this // flag does is show a submenu on the UI, which is useless for the mackie // because feedback is always on. In any case, who'd want to use the // mcu without the motorised sliders doing their thing? - supports_feedback : false, - probe : probe_mackie_protocol, - initialize : new_mackie_protocol, - destroy : delete_mackie_protocol + /*supports_feedback : */ false, + /*probe : */ probe_mackie_protocol, + /*initialize : */ new_mackie_protocol, + /*destroy : */ delete_mackie_protocol }; -extern "C" { - -ControlProtocolDescriptor* -protocol_descriptor () { - return &mackie_descriptor; -} - -} +extern "C" LIBCONTROLCP_API ControlProtocolDescriptor* protocol_descriptor () { return &mackie_descriptor; } diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index e9bef5a9b0..c83ce819d9 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -29,7 +29,6 @@ #include <float.h> #include <sys/time.h> #include <errno.h> -#include <poll.h> #include <boost/shared_array.hpp> @@ -1272,7 +1271,9 @@ MackieControlProtocol::midi_input_handler (IOCondition ioc, MIDI::Port* port) */ if (!_device_info.uses_ipmidi()) { +#ifndef PLATFORM_WINDOWS CrossThreadChannel::drain (port->selectable()); +#endif } DEBUG_TRACE (DEBUG::MackieControl, string_compose ("data available on %1\n", port->name())); diff --git a/libs/surfaces/mackie/wscript b/libs/surfaces/mackie/wscript index beba402fa1..2dc546a5d7 100644 --- a/libs/surfaces/mackie/wscript +++ b/libs/surfaces/mackie/wscript @@ -46,6 +46,8 @@ def build(bld): # need ../libs because some GTK2 header files require stuff there obj.includes = ['.', '../libs'] obj.name = 'libardour_mcp' + obj.defines = [ 'LIBCONTROLCP_EXPORTS' ] + obj.defines += [ 'PACKAGE="libardour_mcp"' ] obj.target = 'ardour_mcp' obj.uselib = 'GTKMM' obj.use = 'libardour libardour_cp libgtkmm2ext' |