X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fmidi%2B%2B2%2Fmidi%2B%2B%2Fipmidi_port.h;h=8cefe09a40888c4506abdd48cd202e9c38ac071b;hb=bfebad3dce3c4aeb634a2979f0785b2713b093a7;hp=7df964232150c768ef04e50ce41ca629eafdfd7b;hpb=d5e14b3d9144400fb8026fb9783a5a8582c0ad87;p=ardour.git diff --git a/libs/midi++2/midi++/ipmidi_port.h b/libs/midi++2/midi++/ipmidi_port.h index 7df9642321..8cefe09a40 100644 --- a/libs/midi++2/midi++/ipmidi_port.h +++ b/libs/midi++2/midi++/ipmidi_port.h @@ -1,5 +1,5 @@ /* - Copyright (C) 1998-2010 Paul Barton-Davis + Copyright (C) 1998-2010 Paul Barton-Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -21,52 +21,61 @@ #include #include -#if defined(WIN32) +#if defined(PLATFORM_WINDOWS) #include +#elif defined(__FreeBSD__) || defined(__OpenBSD__) +#include +#include +#if defined(__FreeBSD__) +#include +#endif +#include +#include +#include +#include +#include +#include +#include #else #include #include #endif -#include - -#include +#include #include "pbd/xml++.h" #include "pbd/crossthread.h" #include "pbd/signals.h" #include "pbd/ringbuffer.h" -#include "evoral/Event.hpp" -#include "evoral/EventRingBuffer.hpp" - +#include "midi++/libmidi_visibility.h" #include "midi++/types.h" #include "midi++/parser.h" #include "midi++/port.h" namespace MIDI { -class IPMIDIPort : public Port { +class LIBMIDIPP_API IPMIDIPort : public Port { public: IPMIDIPort (int base_port = lowest_ipmidi_port_default, const std::string& ifname = std::string()); IPMIDIPort (const XMLNode&); ~IPMIDIPort (); - + 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; static const int lowest_ipmidi_port_default = 21928; -private: +private: int sockin; int sockout; struct sockaddr_in addrout; - Glib::Mutex write_lock; + Glib::Threads::Mutex write_lock; bool open_sockets (int base_port, const std::string& ifname); void close_sockets ();