Add conditional for older rtmidi lib
This commit is contained in:
parent
82aea2c6d9
commit
b851dc3a10
1 changed files with 14 additions and 2 deletions
|
|
@ -6,6 +6,18 @@
|
||||||
|
|
||||||
#include "mustang.h"
|
#include "mustang.h"
|
||||||
|
|
||||||
|
// If you see a compiler error complaining about a missing
|
||||||
|
// symbol 'RtMidiError' you probably have an old version of
|
||||||
|
// of the library and will need to build with this flag:
|
||||||
|
// $ make CPPFLAGS=-DRTMIDI_2_0
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifdef RTMIDI_2_0
|
||||||
|
# define RT_ERROR RtError
|
||||||
|
#else
|
||||||
|
# define RT_ERROR RtMidiError
|
||||||
|
#endif
|
||||||
|
|
||||||
static Mustang mustang;
|
static Mustang mustang;
|
||||||
|
|
||||||
static int channel;
|
static int channel;
|
||||||
|
|
@ -140,7 +152,7 @@ int main( int argc, const char **argv ) {
|
||||||
try {
|
try {
|
||||||
input_handler.openVirtualPort( argv[2] );
|
input_handler.openVirtualPort( argv[2] );
|
||||||
}
|
}
|
||||||
catch ( RtError &error ) {
|
catch ( RT_ERROR &error ) {
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -149,7 +161,7 @@ int main( int argc, const char **argv ) {
|
||||||
try {
|
try {
|
||||||
input_handler.openPort( port );
|
input_handler.openPort( port );
|
||||||
}
|
}
|
||||||
catch ( RtError &error ) {
|
catch ( RT_ERROR &error ) {
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue