Show matching controller name in automation lane header.
[ardour.git] / libs / midi++2 / midi++ / ipmidi_port.h
index bf949bd60129cf962d9f936fd460221b934e257a..c077170026a8e7e8dbf0e87a988fe89008115321 100644 (file)
 #include <iostream>
 #if defined(WIN32)
 #include <winsock.h>
+#elif defined(__FREE_BSD__)
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <sys/_sockaddr_storage.h>
+#include <arpa/inet.h>
+#include <netinet/ip_carp.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <net/route.h>
 #else
 #include <arpa/inet.h>
 #include <net/if.h>
 #endif
 
+#include <glibmm/threads.h>
+
 #include <jack/types.h>
 
 #include "pbd/xml++.h"
@@ -35,9 +48,6 @@
 #include "pbd/signals.h"
 #include "pbd/ringbuffer.h"
 
-#include "evoral/Event.hpp"
-#include "evoral/EventRingBuffer.hpp"
-
 #include "midi++/types.h"
 #include "midi++/parser.h"
 #include "midi++/port.h"
@@ -53,7 +63,7 @@ class IPMIDIPort : public Port {
     XMLNode& get_state () const;
     void set_state (const XMLNode&);
     
-    int write (byte *msg, size_t msglen, timestamp_t timestamp);
+    int write (const byte *msg, size_t msglen, timestamp_t timestamp);
     int read (byte *buf, size_t bufsize);
     void parse (framecnt_t timestamp);
     int selectable () const;
@@ -64,7 +74,8 @@ private:
     int sockin;
     int sockout;
     struct sockaddr_in addrout;
-    
+    Glib::Threads::Mutex write_lock;    
+
     bool open_sockets (int base_port, const std::string& ifname);
     void close_sockets ();