mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-23 07:06:23 +01:00
export-ify libmidipp
This commit is contained in:
parent
3e32fb6d48
commit
9b7c33096a
9 changed files with 33 additions and 22 deletions
|
|
@ -36,7 +36,7 @@ class Port;
|
||||||
* This remembers various useful information about the current 'state' of a
|
* This remembers various useful information about the current 'state' of a
|
||||||
* MIDI channel (eg current pitch bend value).
|
* MIDI channel (eg current pitch bend value).
|
||||||
*/
|
*/
|
||||||
class Channel : public PBD::ScopedConnectionList {
|
class LIBMIDIPP_API Channel : public PBD::ScopedConnectionList {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Channel (byte channel_number, Port &);
|
Channel (byte channel_number, Port &);
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include "midi++/libmidi_visibility.h"
|
||||||
#include "midi++/types.h"
|
#include "midi++/types.h"
|
||||||
#include "midi++/events.h"
|
#include "midi++/events.h"
|
||||||
#include "pbd/xml++.h"
|
#include "pbd/xml++.h"
|
||||||
|
|
|
||||||
|
|
@ -48,13 +48,14 @@
|
||||||
#include "pbd/signals.h"
|
#include "pbd/signals.h"
|
||||||
#include "pbd/ringbuffer.h"
|
#include "pbd/ringbuffer.h"
|
||||||
|
|
||||||
|
#include "midi++/libmidi_visibility.h"
|
||||||
#include "midi++/types.h"
|
#include "midi++/types.h"
|
||||||
#include "midi++/parser.h"
|
#include "midi++/parser.h"
|
||||||
#include "midi++/port.h"
|
#include "midi++/port.h"
|
||||||
|
|
||||||
namespace MIDI {
|
namespace MIDI {
|
||||||
|
|
||||||
class IPMIDIPort : public Port {
|
class LIBMIDIPP_API IPMIDIPort : public Port {
|
||||||
public:
|
public:
|
||||||
IPMIDIPort (int base_port = lowest_ipmidi_port_default, const std::string& ifname = std::string());
|
IPMIDIPort (int base_port = lowest_ipmidi_port_default, const std::string& ifname = std::string());
|
||||||
IPMIDIPort (const XMLNode&);
|
IPMIDIPort (const XMLNode&);
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "midi++/libmidi_visibility.h"
|
||||||
#include "midi++/event.h"
|
#include "midi++/event.h"
|
||||||
#include "pbd/xml++.h"
|
#include "pbd/xml++.h"
|
||||||
|
|
||||||
|
|
@ -39,7 +40,7 @@ namespace MIDI
|
||||||
namespace Name
|
namespace Name
|
||||||
{
|
{
|
||||||
|
|
||||||
struct PatchPrimaryKey
|
struct LIBMIDIPP_API PatchPrimaryKey
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int bank_number;
|
int bank_number;
|
||||||
|
|
@ -81,7 +82,7 @@ public:
|
||||||
|
|
||||||
class PatchBank;
|
class PatchBank;
|
||||||
|
|
||||||
class Patch
|
class LIBMIDIPP_API Patch
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
@ -112,7 +113,7 @@ private:
|
||||||
|
|
||||||
typedef std::list<boost::shared_ptr<Patch> > PatchNameList;
|
typedef std::list<boost::shared_ptr<Patch> > PatchNameList;
|
||||||
|
|
||||||
class PatchBank
|
class LIBMIDIPP_API PatchBank
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PatchBank (uint16_t n = 0, std::string a_name = std::string()) : _name(a_name), _number (n) {};
|
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;
|
std::string _patch_list_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ChannelNameSet
|
class LIBMIDIPP_API ChannelNameSet
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::set<uint8_t> AvailableForChannels;
|
typedef std::set<uint8_t> AvailableForChannels;
|
||||||
|
|
@ -221,7 +222,7 @@ private:
|
||||||
|
|
||||||
std::ostream& operator<< (std::ostream&, const ChannelNameSet&);
|
std::ostream& operator<< (std::ostream&, const ChannelNameSet&);
|
||||||
|
|
||||||
class Note
|
class LIBMIDIPP_API Note
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Note() {}
|
Note() {}
|
||||||
|
|
@ -241,7 +242,7 @@ private:
|
||||||
std::string _name;
|
std::string _name;
|
||||||
};
|
};
|
||||||
|
|
||||||
class NoteNameList
|
class LIBMIDIPP_API NoteNameList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::vector< boost::shared_ptr<Note> > Notes;
|
typedef std::vector< boost::shared_ptr<Note> > Notes;
|
||||||
|
|
@ -262,7 +263,7 @@ private:
|
||||||
Notes _notes;
|
Notes _notes;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Control
|
class LIBMIDIPP_API Control
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Control() {}
|
Control() {}
|
||||||
|
|
@ -291,7 +292,7 @@ private:
|
||||||
std::string _name;
|
std::string _name;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ControlNameList
|
class LIBMIDIPP_API ControlNameList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::map<uint16_t, boost::shared_ptr<Control> > Controls;
|
typedef std::map<uint16_t, boost::shared_ptr<Control> > Controls;
|
||||||
|
|
@ -315,7 +316,7 @@ private:
|
||||||
Controls _controls;
|
Controls _controls;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CustomDeviceMode
|
class LIBMIDIPP_API CustomDeviceMode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CustomDeviceMode() {};
|
CustomDeviceMode() {};
|
||||||
|
|
@ -341,7 +342,7 @@ private:
|
||||||
std::string _channel_name_set_assignments[16];
|
std::string _channel_name_set_assignments[16];
|
||||||
};
|
};
|
||||||
|
|
||||||
class MasterDeviceNames
|
class LIBMIDIPP_API MasterDeviceNames
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::set<std::string> Models;
|
typedef std::set<std::string> Models;
|
||||||
|
|
@ -395,7 +396,7 @@ private:
|
||||||
ControlNameLists _control_name_lists;
|
ControlNameLists _control_name_lists;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MIDINameDocument
|
class LIBMIDIPP_API MIDINameDocument
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Maps Model names to MasterDeviceNames
|
// Maps Model names to MasterDeviceNames
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
#include "pbd/signals.h"
|
#include "pbd/signals.h"
|
||||||
#include "pbd/ringbuffer.h"
|
#include "pbd/ringbuffer.h"
|
||||||
|
|
||||||
|
#include "midi++/libmidi_visibility.h"
|
||||||
#include "midi++/types.h"
|
#include "midi++/types.h"
|
||||||
#include "midi++/parser.h"
|
#include "midi++/parser.h"
|
||||||
|
|
||||||
|
|
@ -40,7 +41,7 @@ class Parser;
|
||||||
class MachineControlCommand;
|
class MachineControlCommand;
|
||||||
|
|
||||||
/** Class to handle incoming and outgoing MIDI machine control messages */
|
/** Class to handle incoming and outgoing MIDI machine control messages */
|
||||||
class MachineControl
|
class LIBMIDIPP_API MachineControl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef PBD::Signal1<void,MachineControl&> MMCSignal;
|
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
|
* 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.
|
* have to be allocated off the stack for RT safety.
|
||||||
*/
|
*/
|
||||||
class MachineControlCommand
|
class LIBMIDIPP_API MachineControlCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MachineControlCommand () : _command (MachineControl::Command (0)) {}
|
MachineControlCommand () : _command (MachineControl::Command (0)) {}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include "pbd/signals.h"
|
#include "pbd/signals.h"
|
||||||
|
|
||||||
|
#include "midi++/libmidi_visibility.h"
|
||||||
#include "midi++/types.h"
|
#include "midi++/types.h"
|
||||||
|
|
||||||
namespace MIDI {
|
namespace MIDI {
|
||||||
|
|
@ -39,7 +40,7 @@ typedef PBD::Signal2<void,Parser &, EventTwoBytes *> TwoByteSignal;
|
||||||
typedef PBD::Signal2<void,Parser &, pitchbend_t> PitchBendSignal;
|
typedef PBD::Signal2<void,Parser &, pitchbend_t> PitchBendSignal;
|
||||||
typedef PBD::Signal3<void,Parser &, byte *, size_t> Signal;
|
typedef PBD::Signal3<void,Parser &, byte *, size_t> Signal;
|
||||||
|
|
||||||
class Parser {
|
class LIBMIDIPP_API Parser {
|
||||||
public:
|
public:
|
||||||
Parser ();
|
Parser ();
|
||||||
~Parser ();
|
~Parser ();
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
#include "pbd/signals.h"
|
#include "pbd/signals.h"
|
||||||
#include "pbd/ringbuffer.h"
|
#include "pbd/ringbuffer.h"
|
||||||
|
|
||||||
|
#include "midi++/libmidi_visibility.h"
|
||||||
#include "midi++/types.h"
|
#include "midi++/types.h"
|
||||||
#include "midi++/parser.h"
|
#include "midi++/parser.h"
|
||||||
|
|
||||||
|
|
@ -37,7 +38,7 @@ namespace MIDI {
|
||||||
class Channel;
|
class Channel;
|
||||||
class PortRequest;
|
class PortRequest;
|
||||||
|
|
||||||
class Port {
|
class LIBMIDIPP_API Port {
|
||||||
public:
|
public:
|
||||||
enum Flags {
|
enum Flags {
|
||||||
IsInput = JackPortIsInput,
|
IsInput = JackPortIsInput,
|
||||||
|
|
@ -136,7 +137,7 @@ class Port {
|
||||||
void init (std::string const &, Flags);
|
void init (std::string const &, Flags);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PortSet {
|
struct LIBMIDIPP_API PortSet {
|
||||||
PortSet (std::string str) : owner (str) { }
|
PortSet (std::string str) : owner (str) { }
|
||||||
|
|
||||||
std::string owner;
|
std::string owner;
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@
|
||||||
#include <jack/jack.h>
|
#include <jack/jack.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
#include "midi++/libmidi_visibility.h"
|
||||||
|
|
||||||
namespace MIDI {
|
namespace MIDI {
|
||||||
|
|
||||||
typedef char channel_t;
|
typedef char channel_t;
|
||||||
|
|
@ -60,10 +62,10 @@ namespace MIDI {
|
||||||
reset = 0xFF
|
reset = 0xFF
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const char *controller_names[];
|
LIBMIDIPP_API extern const char *controller_names[];
|
||||||
byte decode_controller_name (const char *name);
|
byte decode_controller_name (const char *name);
|
||||||
|
|
||||||
struct EventTwoBytes {
|
struct LIBMIDIPP_API EventTwoBytes {
|
||||||
union {
|
union {
|
||||||
byte note_number;
|
byte note_number;
|
||||||
byte controller_number;
|
byte controller_number;
|
||||||
|
|
@ -74,14 +76,14 @@ namespace MIDI {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MTC_FPS {
|
enum LIBMIDIPP_API MTC_FPS {
|
||||||
MTC_24_FPS = 0,
|
MTC_24_FPS = 0,
|
||||||
MTC_25_FPS = 1,
|
MTC_25_FPS = 1,
|
||||||
MTC_30_FPS_DROP = 2,
|
MTC_30_FPS_DROP = 2,
|
||||||
MTC_30_FPS = 3
|
MTC_30_FPS = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MTC_Status {
|
enum LIBMIDIPP_API MTC_Status {
|
||||||
MTC_Stopped = 0,
|
MTC_Stopped = 0,
|
||||||
MTC_Forward,
|
MTC_Forward,
|
||||||
MTC_Backward
|
MTC_Backward
|
||||||
|
|
|
||||||
|
|
@ -62,9 +62,12 @@ def build(bld):
|
||||||
# Library
|
# Library
|
||||||
if bld.is_defined ('INTERNAL_SHARED_LIBS'):
|
if bld.is_defined ('INTERNAL_SHARED_LIBS'):
|
||||||
obj = bld.shlib(features = 'cxx cxxshlib', source=libmidi_sources)
|
obj = bld.shlib(features = 'cxx cxxshlib', source=libmidi_sources)
|
||||||
|
obj.defines = [ 'LIBMIDIPP_DLL=1', 'LIBMIDIPP_DLL_EXPORTS=1' ]
|
||||||
else:
|
else:
|
||||||
obj = bld.stlib(features = 'cxx cxxstlib', source=libmidi_sources)
|
obj = bld.stlib(features = 'cxx cxxstlib', source=libmidi_sources)
|
||||||
obj.cxxflags = [ '-fPIC', '-DWITH_JACK_MIDI' ]
|
obj.cxxflags = [ '-fPIC', '-DWITH_JACK_MIDI' ]
|
||||||
|
obj.defines = []
|
||||||
|
|
||||||
# everybody loves JACK
|
# everybody loves JACK
|
||||||
obj.export_includes = ['.']
|
obj.export_includes = ['.']
|
||||||
obj.includes = ['.', '../surfaces/control_protocol', '../ardour' ]
|
obj.includes = ['.', '../surfaces/control_protocol', '../ardour' ]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue