projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b8109ef
)
'libs/midi++2' - Modify to be buildable with MSVC
author
John Emmas
<johne53@tiscali.co.uk>
Thu, 25 Jul 2013 06:19:51 +0000
(07:19 +0100)
committer
John Emmas
<johne53@tiscali.co.uk>
Thu, 25 Jul 2013 06:19:51 +0000
(07:19 +0100)
libs/midi++2/channel.cc
patch
|
blob
|
history
libs/midi++2/ipmidi_port.cc
patch
|
blob
|
history
libs/midi++2/jack_midi_port.cc
patch
|
blob
|
history
libs/midi++2/midnam_patch.cc
patch
|
blob
|
history
libs/midi++2/mmc.cc
patch
|
blob
|
history
libs/midi++2/mtc.cc
patch
|
blob
|
history
libs/midi++2/parser.cc
patch
|
blob
|
history
msvc_extra_headers/ardourext/sys/time.h.input
patch
|
blob
|
history
diff --git
a/libs/midi++2/channel.cc
b/libs/midi++2/channel.cc
index 66ce5ed71ca6ad99f407d7f23f01d94b0ac8cca6..ed8f4da5bc2b56c7910fd263f5aa7140a4d306ae 100644
(file)
--- a/
libs/midi++2/channel.cc
+++ b/
libs/midi++2/channel.cc
@@
-25,7
+25,7
@@
using namespace MIDI;
using namespace MIDI;
-Channel::Channel (byte channelnum, Port &p)
+Channel::Channel (
MIDI::
byte channelnum, Port &p)
: _port (p)
{
_channel_number = channelnum;
: _port (p)
{
_channel_number = channelnum;
@@
-182,13
+182,13
@@
Channel::process_controller (Parser & /*parser*/, EventTwoBytes *tb)
}
void
}
void
-Channel::process_program_change (Parser & /*parser*/, byte val)
+Channel::process_program_change (Parser & /*parser*/,
MIDI::
byte val)
{
_program_number = val;
}
void
{
_program_number = val;
}
void
-Channel::process_chanpress (Parser & /*parser*/, byte val)
+Channel::process_chanpress (Parser & /*parser*/,
MIDI::
byte val)
{
_chanpress = val;
}
{
_chanpress = val;
}
@@
-215,7
+215,7
@@
Channel::process_reset (Parser & /*parser*/)
* \return true if success
*/
bool
* \return true if success
*/
bool
-Channel::channel_msg (
byte id, byte val1,
byte val2, timestamp_t timestamp)
+Channel::channel_msg (
MIDI::byte id, MIDI::byte val1, MIDI::
byte val2, timestamp_t timestamp)
{
unsigned char msg[3];
int len = 0;
{
unsigned char msg[3];
int len = 0;
diff --git
a/libs/midi++2/ipmidi_port.cc
b/libs/midi++2/ipmidi_port.cc
index 7f166f5b24c13c7c66de351756b9dbb5af7d6406..297ad894f7c060edeb30140e3dac377d6fdde12a 100644
(file)
--- a/
libs/midi++2/ipmidi_port.cc
+++ b/
libs/midi++2/ipmidi_port.cc
@@
-254,7
+254,7
@@
IPMIDIPort::open_sockets (int base_port, const string& ifname)
}
int
}
int
-IPMIDIPort::write (const byte* msg, size_t msglen, timestamp_t /* ignored */) {
+IPMIDIPort::write (const
MIDI::
byte* msg, size_t msglen, timestamp_t /* ignored */) {
if (sockout) {
Glib::Threads::Mutex::Lock lm (write_lock);
if (sockout) {
Glib::Threads::Mutex::Lock lm (write_lock);
@@
-268,7
+268,7
@@
IPMIDIPort::write (const byte* msg, size_t msglen, timestamp_t /* ignored */) {
}
int
}
int
-IPMIDIPort::read (byte* /*buf*/, size_t /*bufsize*/)
+IPMIDIPort::read (
MIDI::
byte* /*buf*/, size_t /*bufsize*/)
{
/* nothing to do here - all handled by parse() */
return 0;
{
/* nothing to do here - all handled by parse() */
return 0;
diff --git
a/libs/midi++2/jack_midi_port.cc
b/libs/midi++2/jack_midi_port.cc
index 3220ca5b55477c8da6708cad660f356b8d74bc0b..cb0d2718375f0b82c5f7d65c1c20a06259e51abc 100644
(file)
--- a/
libs/midi++2/jack_midi_port.cc
+++ b/
libs/midi++2/jack_midi_port.cc
@@
-214,12
+214,12
@@
JackMIDIPort::drain (int check_interval_usecs)
if (vec.len[0] + vec.len[1] >= output_fifo.bufsize() - 1) {
break;
}
if (vec.len[0] + vec.len[1] >= output_fifo.bufsize() - 1) {
break;
}
- usleep (check_interval_usecs);
+
g_
usleep (check_interval_usecs);
}
}
int
}
}
int
-JackMIDIPort::write (const byte * msg, size_t msglen, timestamp_t timestamp)
+JackMIDIPort::write (const
MIDI::
byte * msg, size_t msglen, timestamp_t timestamp)
{
int ret = 0;
{
int ret = 0;
@@
-347,7
+347,7
@@
JackMIDIPort::flush (void* jack_port_buffer)
}
int
}
int
-JackMIDIPort::read (byte *, size_t)
+JackMIDIPort::read (
MIDI::
byte *, size_t)
{
if (!receives_input()) {
return 0;
{
if (!receives_input()) {
return 0;
@@
-356,9
+356,9
@@
JackMIDIPort::read (byte *, size_t)
timestamp_t time;
Evoral::EventType type;
uint32_t size;
timestamp_t time;
Evoral::EventType type;
uint32_t size;
-
byte buffer[input_fifo.capacity()]
;
+
vector<MIDI::byte> buffer(input_fifo.capacity())
;
- while (input_fifo.read (&time, &type, &size,
buffer
)) {
+ while (input_fifo.read (&time, &type, &size,
&buffer[0]
)) {
_parser->set_timestamp (time);
for (uint32_t i = 0; i < size; ++i) {
_parser->scanner (buffer[i]);
_parser->set_timestamp (time);
for (uint32_t i = 0; i < size; ++i) {
_parser->scanner (buffer[i]);
diff --git
a/libs/midi++2/midnam_patch.cc
b/libs/midi++2/midnam_patch.cc
index bf22792f70a1319ff49100dbfae9eb2366d7f790..0498168843ed2fd4f8cc1673eed948be7d4055ac 100644
(file)
--- a/
libs/midi++2/midnam_patch.cc
+++ b/
libs/midi++2/midnam_patch.cc
@@
-371,7
+371,7
@@
operator<< (std::ostream& os, const ChannelNameSet& cns)
<< "List size " << cns._patch_list.size() << endl
<< "Patch list name = [" << cns._patch_list_name << ']' << endl
<< "Available channels : ";
<< "List size " << cns._patch_list.size() << endl
<< "Patch list name = [" << cns._patch_list_name << ']' << endl
<< "Available channels : ";
- for (set<uint8_t>::iterator x = cns._available_for_channels.begin(); x != cns._available_for_channels.end(); ++x) {
+ for (set<uint8_t>::
const_
iterator x = cns._available_for_channels.begin(); x != cns._available_for_channels.end(); ++x) {
os << (int) (*x) << ' ';
}
os << endl;
os << (int) (*x) << ' ';
}
os << endl;
diff --git
a/libs/midi++2/mmc.cc
b/libs/midi++2/mmc.cc
index 06eadb5b34adcead348030f8061b05d769cc5b02..1b8de40358914048cf2995253c2d03a048b0fc77 100644
(file)
--- a/
libs/midi++2/mmc.cc
+++ b/
libs/midi++2/mmc.cc
@@
-29,6
+29,10
@@
#include "midi++/parser.h"
#include "midi++/manager.h"
#include "midi++/parser.h"
#include "midi++/manager.h"
+#ifndef __INT_MAX__ // 'ssize_t' won't be defined yet
+typedef long ssize_t;
+#endif
+
using namespace std;
using namespace MIDI;
using namespace PBD;
using namespace std;
using namespace MIDI;
using namespace PBD;
@@
-213,19
+217,19
@@
MachineControl::MachineControl (Manager* m, jack_client_t* jack)
}
void
}
void
-MachineControl::set_receive_device_id (byte id)
+MachineControl::set_receive_device_id (
MIDI::
byte id)
{
_receive_device_id = id & 0x7f;
}
void
{
_receive_device_id = id & 0x7f;
}
void
-MachineControl::set_send_device_id (byte id)
+MachineControl::set_send_device_id (
MIDI::
byte id)
{
_send_device_id = id & 0x7f;
}
bool
{
_send_device_id = id & 0x7f;
}
bool
-MachineControl::is_mmc (byte *sysex_buf, size_t len)
+MachineControl::is_mmc (
MIDI::
byte *sysex_buf, size_t len)
{
if (len < 4 || len > 48) {
return false;
{
if (len < 4 || len > 48) {
return false;
@@
-244,7
+248,7
@@
MachineControl::is_mmc (byte *sysex_buf, size_t len)
}
void
}
void
-MachineControl::process_mmc_message (Parser &, byte *msg, size_t len)
+MachineControl::process_mmc_message (Parser &,
MIDI::
byte *msg, size_t len)
{
size_t skiplen;
byte *mmc_msg;
{
size_t skiplen;
byte *mmc_msg;
@@
-451,7
+455,7
@@
MachineControl::process_mmc_message (Parser &, byte *msg, size_t len)
}
int
}
int
-MachineControl::do_masked_write (byte *msg, size_t len)
+MachineControl::do_masked_write (
MIDI::
byte *msg, size_t len)
{
/* return the number of bytes "consumed" */
{
/* return the number of bytes "consumed" */
@@
-477,7
+481,7
@@
MachineControl::do_masked_write (byte *msg, size_t len)
}
void
}
void
-MachineControl::write_track_status (
byte *msg, size_t /*len*/,
byte reg)
+MachineControl::write_track_status (
MIDI::byte *msg, size_t /*len*/, MIDI::
byte reg)
{
size_t n;
ssize_t base_track;
{
size_t n;
ssize_t base_track;
@@
-566,7
+570,7
@@
MachineControl::write_track_status (byte *msg, size_t /*len*/, byte reg)
}
int
}
int
-MachineControl::do_locate (byte *msg, size_t /*msglen*/)
+MachineControl::do_locate (
MIDI::
byte *msg, size_t /*msglen*/)
{
if (msg[2] == 0) {
warning << "MIDI::MMC: locate [I/F] command not supported"
{
if (msg[2] == 0) {
warning << "MIDI::MMC: locate [I/F] command not supported"
@@
-581,7
+585,7
@@
MachineControl::do_locate (byte *msg, size_t /*msglen*/)
}
int
}
int
-MachineControl::do_step (byte *msg, size_t /*msglen*/)
+MachineControl::do_step (
MIDI::
byte *msg, size_t /*msglen*/)
{
int steps = msg[2] & 0x3f;
{
int steps = msg[2] & 0x3f;
@@
-594,7
+598,7
@@
MachineControl::do_step (byte *msg, size_t /*msglen*/)
}
int
}
int
-MachineControl::do_shuttle (byte *msg, size_t /*msglen*/)
+MachineControl::do_shuttle (
MIDI::
byte *msg, size_t /*msglen*/)
{
size_t forward;
byte sh = msg[2];
{
size_t forward;
byte sh = msg[2];
diff --git
a/libs/midi++2/mtc.cc
b/libs/midi++2/mtc.cc
index affe65ec680dae6c5b8bc88beee5d4c4a99ab7e1..3c58b6684f49f369177e69fea11dfabb466061db 100644
(file)
--- a/
libs/midi++2/mtc.cc
+++ b/
libs/midi++2/mtc.cc
@@
-36,7
+36,7
@@
using namespace MIDI;
#undef DEBUG_MTC
bool
#undef DEBUG_MTC
bool
-Parser::possible_mtc (byte *sysex_buf, size_t msglen)
+Parser::possible_mtc (
MIDI::
byte *sysex_buf, size_t msglen)
{
byte fake_mtc_time[5];
{
byte fake_mtc_time[5];
@@
-91,7
+91,7
@@
Parser::reset_mtc_state ()
}
void
}
void
-Parser::process_mtc_quarter_frame (byte *msg)
+Parser::process_mtc_quarter_frame (
MIDI::
byte *msg)
{
int which_quarter_frame = (msg[1] & 0xf0) >> 4;
{
int which_quarter_frame = (msg[1] & 0xf0) >> 4;
diff --git
a/libs/midi++2/parser.cc
b/libs/midi++2/parser.cc
index 8e3af64504407f8cdbf5e9377256bbdac1a2a3b6..94daef787190d5c99497724fddb4d63237793989 100644
(file)
--- a/
libs/midi++2/parser.cc
+++ b/
libs/midi++2/parser.cc
@@
-137,7
+137,7
@@
Parser::~Parser ()
}
void
}
void
-Parser::trace_event (Parser &, byte *msg, size_t len)
+Parser::trace_event (Parser &,
MIDI::
byte *msg, size_t len)
{
eventType type;
ostream *o;
{
eventType type;
ostream *o;
@@
-659,7
+659,7
@@
Parser::system_msg (unsigned char inbyte)
}
void
}
void
-Parser::signal (byte *msg, size_t len)
+Parser::signal (
MIDI::
byte *msg, size_t len)
{
channel_t chan = msg[0]&0xF;
int chan_i = chan;
{
channel_t chan = msg[0]&0xF;
int chan_i = chan;
@@
-762,7
+762,7
@@
Parser::signal (byte *msg, size_t len)
}
bool
}
bool
-Parser::possible_mmc (byte *msg, size_t msglen)
+Parser::possible_mmc (
MIDI::
byte *msg, size_t msglen)
{
if (!MachineControl::is_mmc (msg, msglen)) {
return false;
{
if (!MachineControl::is_mmc (msg, msglen)) {
return false;
diff --git
a/msvc_extra_headers/ardourext/sys/time.h.input
b/msvc_extra_headers/ardourext/sys/time.h.input
index 2e54976641659b74863d22eb7041599f859cf7ca..11bd6bf34db3bbed6358d10f62570843eba46b02 100644
(file)
--- a/
msvc_extra_headers/ardourext/sys/time.h.input
+++ b/
msvc_extra_headers/ardourext/sys/time.h.input
@@
-2,7
+2,7
@@
#define _WINX_SYS_TIME_H_
//#include <features.h>
#define _WINX_SYS_TIME_H_
//#include <features.h>
-#include <WinSock
.h> // gets 'struct timeval'
+#include <WinSock
2.h> // gets 'struct timeval' - Changed by JE - 23-07-2013. Was formerly. . . #include <WinSock.h>
#ifdef _TIMEVAL_DEFINED
# define _STRUCT_TIMEVAL 1
#ifdef _TIMEVAL_DEFINED
# define _STRUCT_TIMEVAL 1