export-ify libmidipp

This commit is contained in:
Paul Davis 2013-10-17 10:27:04 -04:00
parent 3e32fb6d48
commit 9b7c33096a
9 changed files with 33 additions and 22 deletions

View File

@ -36,7 +36,7 @@ class Port;
* This remembers various useful information about the current 'state' of a
* MIDI channel (eg current pitch bend value).
*/
class Channel : public PBD::ScopedConnectionList {
class LIBMIDIPP_API Channel : public PBD::ScopedConnectionList {
public:
Channel (byte channel_number, Port &);

View File

@ -26,6 +26,7 @@
#include <sstream>
#include <assert.h>
#include "midi++/libmidi_visibility.h"
#include "midi++/types.h"
#include "midi++/events.h"
#include "pbd/xml++.h"

View File

@ -48,13 +48,14 @@
#include "pbd/signals.h"
#include "pbd/ringbuffer.h"
#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&);

View File

@ -30,6 +30,7 @@
#include <stdint.h>
#include "midi++/libmidi_visibility.h"
#include "midi++/event.h"
#include "pbd/xml++.h"
@ -39,7 +40,7 @@ namespace MIDI
namespace Name
{
struct PatchPrimaryKey
struct LIBMIDIPP_API PatchPrimaryKey
{
public:
int bank_number;
@ -81,7 +82,7 @@ public:
class PatchBank;
class Patch
class LIBMIDIPP_API Patch
{
public:
@ -112,7 +113,7 @@ private:
typedef std::list<boost::shared_ptr<Patch> > PatchNameList;
class PatchBank
class LIBMIDIPP_API PatchBank
{
public:
PatchBank (uint16_t n = 0, std::string a_name = std::string()) : _name(a_name), _number (n) {};
@ -138,7 +139,7 @@ private:
std::string _patch_list_name;
};
class ChannelNameSet
class LIBMIDIPP_API ChannelNameSet
{
public:
typedef std::set<uint8_t> AvailableForChannels;
@ -221,7 +222,7 @@ private:
std::ostream& operator<< (std::ostream&, const ChannelNameSet&);
class Note
class LIBMIDIPP_API Note
{
public:
Note() {}
@ -241,7 +242,7 @@ private:
std::string _name;
};
class NoteNameList
class LIBMIDIPP_API NoteNameList
{
public:
typedef std::vector< boost::shared_ptr<Note> > Notes;
@ -262,7 +263,7 @@ private:
Notes _notes;
};
class Control
class LIBMIDIPP_API Control
{
public:
Control() {}
@ -291,7 +292,7 @@ private:
std::string _name;
};
class ControlNameList
class LIBMIDIPP_API ControlNameList
{
public:
typedef std::map<uint16_t, boost::shared_ptr<Control> > Controls;
@ -315,7 +316,7 @@ private:
Controls _controls;
};
class CustomDeviceMode
class LIBMIDIPP_API CustomDeviceMode
{
public:
CustomDeviceMode() {};
@ -341,7 +342,7 @@ private:
std::string _channel_name_set_assignments[16];
};
class MasterDeviceNames
class LIBMIDIPP_API MasterDeviceNames
{
public:
typedef std::set<std::string> Models;
@ -395,7 +396,7 @@ private:
ControlNameLists _control_name_lists;
};
class MIDINameDocument
class LIBMIDIPP_API MIDINameDocument
{
public:
// Maps Model names to MasterDeviceNames

View File

@ -26,6 +26,7 @@
#include "pbd/signals.h"
#include "pbd/ringbuffer.h"
#include "midi++/libmidi_visibility.h"
#include "midi++/types.h"
#include "midi++/parser.h"
@ -40,7 +41,7 @@ class Parser;
class MachineControlCommand;
/** Class to handle incoming and outgoing MIDI machine control messages */
class MachineControl
class LIBMIDIPP_API MachineControl
{
public:
typedef PBD::Signal1<void,MachineControl&> MMCSignal;
@ -287,7 +288,7 @@ class MachineControl
* In an ideal world we might use a class hierarchy for this, but objects of this type
* have to be allocated off the stack for RT safety.
*/
class MachineControlCommand
class LIBMIDIPP_API MachineControlCommand
{
public:
MachineControlCommand () : _command (MachineControl::Command (0)) {}

View File

@ -25,6 +25,7 @@
#include "pbd/signals.h"
#include "midi++/libmidi_visibility.h"
#include "midi++/types.h"
namespace MIDI {
@ -39,7 +40,7 @@ typedef PBD::Signal2<void,Parser &, EventTwoBytes *> TwoByteSignal;
typedef PBD::Signal2<void,Parser &, pitchbend_t> PitchBendSignal;
typedef PBD::Signal3<void,Parser &, byte *, size_t> Signal;
class Parser {
class LIBMIDIPP_API Parser {
public:
Parser ();
~Parser ();

View File

@ -29,6 +29,7 @@
#include "pbd/signals.h"
#include "pbd/ringbuffer.h"
#include "midi++/libmidi_visibility.h"
#include "midi++/types.h"
#include "midi++/parser.h"
@ -37,7 +38,7 @@ namespace MIDI {
class Channel;
class PortRequest;
class Port {
class LIBMIDIPP_API Port {
public:
enum Flags {
IsInput = JackPortIsInput,
@ -136,7 +137,7 @@ class Port {
void init (std::string const &, Flags);
};
struct PortSet {
struct LIBMIDIPP_API PortSet {
PortSet (std::string str) : owner (str) { }
std::string owner;

View File

@ -23,6 +23,8 @@
#include <jack/jack.h>
#include <inttypes.h>
#include "midi++/libmidi_visibility.h"
namespace MIDI {
typedef char channel_t;
@ -60,10 +62,10 @@ namespace MIDI {
reset = 0xFF
};
extern const char *controller_names[];
LIBMIDIPP_API extern const char *controller_names[];
byte decode_controller_name (const char *name);
struct EventTwoBytes {
struct LIBMIDIPP_API EventTwoBytes {
union {
byte note_number;
byte controller_number;
@ -74,14 +76,14 @@ namespace MIDI {
};
};
enum MTC_FPS {
enum LIBMIDIPP_API MTC_FPS {
MTC_24_FPS = 0,
MTC_25_FPS = 1,
MTC_30_FPS_DROP = 2,
MTC_30_FPS = 3
};
enum MTC_Status {
enum LIBMIDIPP_API MTC_Status {
MTC_Stopped = 0,
MTC_Forward,
MTC_Backward

View File

@ -62,9 +62,12 @@ def build(bld):
# Library
if bld.is_defined ('INTERNAL_SHARED_LIBS'):
obj = bld.shlib(features = 'cxx cxxshlib', source=libmidi_sources)
obj.defines = [ 'LIBMIDIPP_DLL=1', 'LIBMIDIPP_DLL_EXPORTS=1' ]
else:
obj = bld.stlib(features = 'cxx cxxstlib', source=libmidi_sources)
obj.cxxflags = [ '-fPIC', '-DWITH_JACK_MIDI' ]
obj.defines = []
# everybody loves JACK
obj.export_includes = ['.']
obj.includes = ['.', '../surfaces/control_protocol', '../ardour' ]