Fabian Peter Hammerle 10 лет назад
Родитель
Сommit
5c264cbc31

+ 0 - 8
.gitignore

@@ -1,9 +1 @@
-/config
-/configure
-/Makefile.in
-/aclocal.m4
-/autom4te.cache
-/configure
-/m4
 /lib
-*.o

+ 11 - 0
CMakeLists.txt

@@ -0,0 +1,11 @@
+cmake_minimum_required (VERSION 2.8.0)
+project(midi)
+
+include_directories("${CMAKE_SOURCE_DIR}")
+include_directories("${CMAKE_SOURCE_DIR}/include")
+
+add_definitions(-pthread)
+add_definitions(-std=c++11)
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
+add_library(midi Input.cpp Output.cpp Message.cpp)
+# target_link_libraries(midi /usr/local/lib/librtmidi.so.2.1.0) 

+ 23 - 0
Input.cpp

@@ -0,0 +1,23 @@
+#include "Input.h"
+#include <vector>
+
+namespace midi {
+
+void Input::setCallback( Input::MessageInCallback callback, void *userData )
+{
+	userCallback = callback;
+    userCallbackData = userData;
+
+	RtMidiIn::setCallback( rtmidiCallback, (void*) this );
+}
+
+void Input::rtmidiCallback( double timeStamp, std::vector<unsigned char> *messageBytes, void *callbackData )
+{
+	Input* input = (Input*) callbackData;
+
+	Message* message = Message::parse(*messageBytes);
+	input->userCallback( timeStamp, *message, input->userCallbackData );
+	delete message;
+}
+
+}; // namespace

+ 23 - 0
Input.h

@@ -0,0 +1,23 @@
+#pragma once
+
+#include <vector>
+#include "RtMidi.h"
+#include "Message.h"
+
+namespace midi {
+
+class Input : public RtMidiIn
+{
+public:
+	typedef void (*MessageInCallback)( double timeStamp, Message &message, void *userData );
+	void setCallback( MessageInCallback callback, void *userData = 0 );
+
+protected:
+	MessageInCallback userCallback;
+    void *userCallbackData;
+	
+private:
+	static void rtmidiCallback( double timeStamp, std::vector<unsigned char> *message, void *midiin );
+};
+
+} // namespace midi

+ 0 - 11
Makefile.am

@@ -1,11 +0,0 @@
-lib_LTLIBRARIES = %D%/librtmidi.la
-%C%_librtmidi_la_LDFLAGS = -no-undefined
-%C%_librtmidi_la_SOURCES = \
-  %D%/MidiMessage.cpp \
-  %D%/RtMidi.cpp \
-  %D%/Midi.cpp \
-  %D%/Launchpad.cpp \
-  %D%/MidiMessage.h \
-  %D%/RtMidi.h \
-  %D%/Midi.h \
-  %D%/Launchpad.h 

+ 10 - 9
MidiMessage.cpp → Message.cpp

@@ -1,8 +1,10 @@
 #include <vector>
-#include "RtMidi.h" // RtMidiError
-#include "MidiMessage.h"
+#include <iostream>
+#include "Message.h"
 
-MidiMessage* MidiMessage::parseMessage(std::vector<unsigned char> &messageBytes)
+namespace midi {
+
+Message* Message::parse(std::vector<unsigned char> &messageBytes)
 {
 	// msg[0] has 8 bits                                                                        
     //	- 4 higher significant bits: message type
@@ -11,7 +13,7 @@ MidiMessage* MidiMessage::parseMessage(std::vector<unsigned char> &messageBytes)
 	if(messageType == 0xF) 
 	{
 		// system message
-		throw RtMidiError("MidiMessage::parseMessage() does not support system messages yet.", RtMidiError::DEBUG_WARNING);
+		throw "Message::parseMessage() does not support system messages yet.";
 	}
 	else
 	{
@@ -46,10 +48,7 @@ MidiMessage* MidiMessage::parseMessage(std::vector<unsigned char> &messageBytes)
 					(messageBytes[2] << 7) + messageBytes[1]
 					);
 			default:
-				throw RtMidiError(
-					"MidiMessage::parseMessage() does not support the given type of channel message yet.", 
-					RtMidiError::DEBUG_WARNING
-					);
+				throw "Message::parseMessage() does not support the given type of channel message yet.";
 		}
 	}
 }
@@ -100,7 +99,7 @@ std::vector<unsigned char> PitchBendChangeMessage::getBytes() const
 	return bytes;
 }
 
-std::ostream& operator<<(std::ostream& stream, const MidiMessage& message)
+std::ostream& operator<<(std::ostream& stream, const Message& message)
 {
 	message.print(stream);
 	return stream;
@@ -136,3 +135,5 @@ void PitchBendChangeMessage::print(std::ostream& stream) const
 	stream	<< "channel #" << (unsigned short)(channel + 1) << ": "
 			<< "pitch bended to " << value << "\n"; 
 }
+
+} // namespace

+ 14 - 10
MidiMessage.h → Message.h

@@ -2,22 +2,24 @@
 #include <stdint.h>
 #include <vector>
 
-class MidiMessage
+namespace midi {
+
+class Message
 {
 public:
-    virtual ~MidiMessage() throw () 
+    virtual ~Message() throw () 
     {
     }
 
-	static MidiMessage* parseMessage(std::vector<unsigned char> &messageBytes);
+	static Message* parse(std::vector<unsigned char> &messageBytes);
 
 	virtual std::vector<unsigned char> getBytes() const = 0;
 	virtual void print(std::ostream& stream) const = 0;
 };
 
-std::ostream& operator<<(std::ostream& stream, const MidiMessage& message);
+std::ostream& operator<<(std::ostream& stream, const Message& message);
 
-class ChannelMessage : public MidiMessage
+class ChannelMessage : public Message
 {
 public:
 	unsigned char channel;
@@ -45,7 +47,7 @@ public:
 
 class NoteOnMessage : public NoteMessage
 {
-	friend class MidiMessage;
+	friend class Message;
 
 protected:
 	static const unsigned char messageType = 0x9;
@@ -62,7 +64,7 @@ public:
 
 class NoteOffMessage : public NoteMessage
 {
-	friend class MidiMessage;
+	friend class Message;
 
 protected:
 	static const unsigned char messageType = 0x8;
@@ -79,7 +81,7 @@ public:
 
 class ControlChangeMessage : public ChannelMessage
 {
-	friend class MidiMessage;
+	friend class Message;
 
 protected:
 	static const unsigned char messageType = 0xB;
@@ -101,7 +103,7 @@ public:
 
 class ProgramChangeMessage : public ChannelMessage
 {
-	friend class MidiMessage;
+	friend class Message;
 
 protected:
 	static const unsigned char messageType = 0xC;
@@ -121,7 +123,7 @@ public:
 
 class PitchBendChangeMessage : public ChannelMessage
 {
-	friend class MidiMessage;
+	friend class Message;
 
 protected:
 	static const unsigned char messageType = 0xE;
@@ -139,3 +141,5 @@ public:
 	virtual void print(std::ostream& stream) const;
 	virtual std::vector<unsigned char> getBytes() const;
 };
+
+} // namespace

+ 0 - 25
Midi.cpp

@@ -1,25 +0,0 @@
-#include "Midi.h"
-#include <vector>
-
-void MidiIn::setCallback( MidiIn::MidiMessageInCallback callback, void *userData )
-{
-	userCallback = callback;
-    userCallbackData = userData;
-
-	RtMidiIn::setCallback( rtmidiCallback, (void*) this );
-}
-
-void MidiIn::rtmidiCallback( double timeStamp, std::vector<unsigned char> *messageBytes, void *callbackData )
-{
-	MidiIn *midiin = (MidiIn*) callbackData;
-
-	MidiMessage* message = MidiMessage::parseMessage(*messageBytes);
-	midiin->userCallback( timeStamp, *message, midiin->userCallbackData );
-	delete message;
-}
-
-void MidiOut::sendMessage(const MidiMessage& message)
-{
-	std::vector<unsigned char> bytes = message.getBytes();
-	RtMidiOut::sendMessage(&bytes);
-}

+ 0 - 25
Midi.h

@@ -1,25 +0,0 @@
-#pragma once
-
-#include <vector>
-#include "RtMidi.h"
-#include "MidiMessage.h"
-
-class MidiIn : public RtMidiIn
-{
-public:
-	typedef void (*MidiMessageInCallback)( double timeStamp, MidiMessage &message, void *userData );
-	void setCallback( MidiMessageInCallback callback, void *userData = 0 );
-
-protected:
-	MidiMessageInCallback userCallback;
-    void *userCallbackData;
-	
-private:
-	static void rtmidiCallback( double timeStamp, std::vector<unsigned char> *message, void *midiin );
-};
-
-class MidiOut : public RtMidiOut
-{
-public:
-	void sendMessage(const MidiMessage& message);
-};

+ 12 - 0
Output.cpp

@@ -0,0 +1,12 @@
+#include "Output.h"
+#include <vector>
+
+namespace midi {
+
+void Output::sendMessage(const Message& message)
+{
+	std::vector<unsigned char> bytes = message.getBytes();
+	RtMidiOut::sendMessage(&bytes);
+}
+
+} // namespace

+ 14 - 0
Output.h

@@ -0,0 +1,14 @@
+#pragma once
+
+#include "RtMidi.h"
+#include "Message.h"
+
+namespace midi {
+
+class Output : public RtMidiOut
+{
+public:
+	void sendMessage(const Message& message);
+};
+
+} // namespace midi

+ 0 - 2818
RtMidi.cpp

@@ -1,2818 +0,0 @@
-/**********************************************************************/
-/*! \class RtMidi
-    \brief An abstract base class for realtime MIDI input/output.
-
-    This class implements some common functionality for the realtime
-    MIDI input/output subclasses RtMidiIn and RtMidiOut.
-
-    RtMidi WWW site: http://music.mcgill.ca/~gary/rtmidi/
-
-    RtMidi: realtime MIDI i/o C++ classes
-    Copyright (c) 2003-2014 Gary P. Scavone
-
-    Permission is hereby granted, free of charge, to any person
-    obtaining a copy of this software and associated documentation files
-    (the "Software"), to deal in the Software without restriction,
-    including without limitation the rights to use, copy, modify, merge,
-    publish, distribute, sublicense, and/or sell copies of the Software,
-    and to permit persons to whom the Software is furnished to do so,
-    subject to the following conditions:
-
-    The above copyright notice and this permission notice shall be
-    included in all copies or substantial portions of the Software.
-
-    Any person wishing to distribute modifications to the Software is
-    asked to send the modifications to the original developer so that
-    they can be incorporated into the canonical version.  This is,
-    however, not a binding provision of this license.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-    ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-    CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-/**********************************************************************/
-
-#include "RtMidi.h"
-#include <sstream>
-
-//*********************************************************************//
-//  RtMidi Definitions
-//*********************************************************************//
-
-RtMidi :: RtMidi()
-  : rtapi_(0)
-{
-}
-
-RtMidi :: ~RtMidi()
-{
-  if ( rtapi_ )
-    delete rtapi_;
-  rtapi_ = 0;
-}
-
-std::string RtMidi :: getVersion( void ) throw()
-{
-  return std::string( RTMIDI_VERSION );
-}
-
-void RtMidi :: getCompiledApi( std::vector<RtMidi::Api> &apis ) throw()
-{
-  apis.clear();
-
-  // The order here will control the order of RtMidi's API search in
-  // the constructor.
-#if defined(__MACOSX_CORE__)
-  apis.push_back( MACOSX_CORE );
-#endif
-#if defined(__LINUX_ALSA__)
-  apis.push_back( LINUX_ALSA );
-#endif
-#if defined(__UNIX_JACK__)
-  apis.push_back( UNIX_JACK );
-#endif
-#if defined(__WINDOWS_MM__)
-  apis.push_back( WINDOWS_MM );
-#endif
-#if defined(__RTMIDI_DUMMY__)
-  apis.push_back( RTMIDI_DUMMY );
-#endif
-}
-
-//*********************************************************************//
-//  RtMidiIn Definitions
-//*********************************************************************//
-
-void RtMidiIn :: openMidiApi( RtMidi::Api api, const std::string clientName, unsigned int queueSizeLimit )
-{
-  if ( rtapi_ )
-    delete rtapi_;
-  rtapi_ = 0;
-
-#if defined(__UNIX_JACK__)
-  if ( api == UNIX_JACK )
-    rtapi_ = new MidiInJack( clientName, queueSizeLimit );
-#endif
-#if defined(__LINUX_ALSA__)
-  if ( api == LINUX_ALSA )
-    rtapi_ = new MidiInAlsa( clientName, queueSizeLimit );
-#endif
-#if defined(__WINDOWS_MM__)
-  if ( api == WINDOWS_MM )
-    rtapi_ = new MidiInWinMM( clientName, queueSizeLimit );
-#endif
-#if defined(__MACOSX_CORE__)
-  if ( api == MACOSX_CORE )
-    rtapi_ = new MidiInCore( clientName, queueSizeLimit );
-#endif
-#if defined(__RTMIDI_DUMMY__)
-  if ( api == RTMIDI_DUMMY )
-    rtapi_ = new MidiInDummy( clientName, queueSizeLimit );
-#endif
-}
-
-RtMidiIn :: RtMidiIn( RtMidi::Api api, const std::string clientName, unsigned int queueSizeLimit )
-  : RtMidi()
-{
-  if ( api != UNSPECIFIED ) {
-    // Attempt to open the specified API.
-    openMidiApi( api, clientName, queueSizeLimit );
-    if ( rtapi_ ) return;
-
-    // No compiled support for specified API value.  Issue a warning
-    // and continue as if no API was specified.
-    std::cerr << "\nRtMidiIn: no compiled support for specified API argument!\n\n" << std::endl;
-  }
-
-  // Iterate through the compiled APIs and return as soon as we find
-  // one with at least one port or we reach the end of the list.
-  std::vector< RtMidi::Api > apis;
-  getCompiledApi( apis );
-  for ( unsigned int i=0; i<apis.size(); i++ ) {
-    openMidiApi( apis[i], clientName, queueSizeLimit );
-    if ( rtapi_->getPortCount() ) break;
-  }
-
-  if ( rtapi_ ) return;
-
-  // It should not be possible to get here because the preprocessor
-  // definition __RTMIDI_DUMMY__ is automatically defined if no
-  // API-specific definitions are passed to the compiler. But just in
-  // case something weird happens, we'll throw an error.
-  std::string errorText = "RtMidiIn: no compiled API support found ... critical error!!";
-  throw( RtMidiError( errorText, RtMidiError::UNSPECIFIED ) );
-}
-
-RtMidiIn :: ~RtMidiIn() throw()
-{
-}
-
-
-//*********************************************************************//
-//  RtMidiOut Definitions
-//*********************************************************************//
-
-void RtMidiOut :: openMidiApi( RtMidi::Api api, const std::string clientName )
-{
-  if ( rtapi_ )
-    delete rtapi_;
-  rtapi_ = 0;
-
-#if defined(__UNIX_JACK__)
-  if ( api == UNIX_JACK )
-    rtapi_ = new MidiOutJack( clientName );
-#endif
-#if defined(__LINUX_ALSA__)
-  if ( api == LINUX_ALSA )
-    rtapi_ = new MidiOutAlsa( clientName );
-#endif
-#if defined(__WINDOWS_MM__)
-  if ( api == WINDOWS_MM )
-    rtapi_ = new MidiOutWinMM( clientName );
-#endif
-#if defined(__MACOSX_CORE__)
-  if ( api == MACOSX_CORE )
-    rtapi_ = new MidiOutCore( clientName );
-#endif
-#if defined(__RTMIDI_DUMMY__)
-  if ( api == RTMIDI_DUMMY )
-    rtapi_ = new MidiOutDummy( clientName );
-#endif
-}
-
-RtMidiOut :: RtMidiOut( RtMidi::Api api, const std::string clientName )
-{
-  if ( api != UNSPECIFIED ) {
-    // Attempt to open the specified API.
-    openMidiApi( api, clientName );
-    if ( rtapi_ ) return;
-
-    // No compiled support for specified API value.  Issue a warning
-    // and continue as if no API was specified.
-    std::cerr << "\nRtMidiOut: no compiled support for specified API argument!\n\n" << std::endl;
-  }
-
-  // Iterate through the compiled APIs and return as soon as we find
-  // one with at least one port or we reach the end of the list.
-  std::vector< RtMidi::Api > apis;
-  getCompiledApi( apis );
-  for ( unsigned int i=0; i<apis.size(); i++ ) {
-    openMidiApi( apis[i], clientName );
-    if ( rtapi_->getPortCount() ) break;
-  }
-
-  if ( rtapi_ ) return;
-
-  // It should not be possible to get here because the preprocessor
-  // definition __RTMIDI_DUMMY__ is automatically defined if no
-  // API-specific definitions are passed to the compiler. But just in
-  // case something weird happens, we'll thrown an error.
-  std::string errorText = "RtMidiOut: no compiled API support found ... critical error!!";
-  throw( RtMidiError( errorText, RtMidiError::UNSPECIFIED ) );
-}
-
-RtMidiOut :: ~RtMidiOut() throw()
-{
-}
-
-//*********************************************************************//
-//  Common MidiApi Definitions
-//*********************************************************************//
-
-MidiApi :: MidiApi( void )
-  : apiData_( 0 ), connected_( false ), errorCallback_(0), errorCallbackUserData_(0)
-{
-}
-
-MidiApi :: ~MidiApi( void )
-{
-}
-
-void MidiApi :: setErrorCallback( RtMidiErrorCallback errorCallback, void *userData = 0 )
-{
-    errorCallback_ = errorCallback;
-    errorCallbackUserData_ = userData;
-}
-
-void MidiApi :: error( RtMidiError::Type type, std::string errorString )
-{
-  if ( errorCallback_ ) {
-
-    if ( firstErrorOccurred_ )
-      return;
-
-    firstErrorOccurred_ = true;
-    const std::string errorMessage = errorString;
-
-    errorCallback_( type, errorMessage, errorCallbackUserData_);
-    firstErrorOccurred_ = false;
-    return;
-  }
-
-  if ( type == RtMidiError::WARNING ) {
-    std::cerr << '\n' << errorString << "\n\n";
-  }
-  else if ( type == RtMidiError::DEBUG_WARNING ) {
-#if defined(__RTMIDI_DEBUG__)
-    std::cerr << '\n' << errorString << "\n\n";
-#endif
-  }
-  else {
-    std::cerr << '\n' << errorString << "\n\n";
-    throw RtMidiError( errorString, type );
-  }
-}
-
-//*********************************************************************//
-//  Common MidiInApi Definitions
-//*********************************************************************//
-
-MidiInApi :: MidiInApi( unsigned int queueSizeLimit )
-  : MidiApi()
-{
-  // Allocate the MIDI queue.
-  inputData_.queue.ringSize = queueSizeLimit;
-  if ( inputData_.queue.ringSize > 0 )
-    inputData_.queue.ring = new MidiMessage[ inputData_.queue.ringSize ];
-}
-
-MidiInApi :: ~MidiInApi( void )
-{
-  // Delete the MIDI queue.
-  if ( inputData_.queue.ringSize > 0 ) delete [] inputData_.queue.ring;
-}
-
-void MidiInApi :: setCallback( RtMidiIn::RtMidiCallback callback, void *userData )
-{
-  if ( inputData_.usingCallback ) {
-    errorString_ = "MidiInApi::setCallback: a callback function is already set!";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  if ( !callback ) {
-    errorString_ = "RtMidiIn::setCallback: callback function value is invalid!";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  inputData_.userCallback = callback;
-  inputData_.userData = userData;
-  inputData_.usingCallback = true;
-}
-
-void MidiInApi :: cancelCallback()
-{
-  if ( !inputData_.usingCallback ) {
-    errorString_ = "RtMidiIn::cancelCallback: no callback function was set!";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  inputData_.userCallback = 0;
-  inputData_.userData = 0;
-  inputData_.usingCallback = false;
-}
-
-void MidiInApi :: ignoreTypes( bool midiSysex, bool midiTime, bool midiSense )
-{
-  inputData_.ignoreFlags = 0;
-  if ( midiSysex ) inputData_.ignoreFlags = 0x01;
-  if ( midiTime ) inputData_.ignoreFlags |= 0x02;
-  if ( midiSense ) inputData_.ignoreFlags |= 0x04;
-}
-
-double MidiInApi :: getMessage( std::vector<unsigned char> *message )
-{
-  message->clear();
-
-  if ( inputData_.usingCallback ) {
-    errorString_ = "RtMidiIn::getNextMessage: a user callback is currently set for this port.";
-    error( RtMidiError::WARNING, errorString_ );
-    return 0.0;
-  }
-
-  if ( inputData_.queue.size == 0 ) return 0.0;
-
-  // Copy queued message to the vector pointer argument and then "pop" it.
-  std::vector<unsigned char> *bytes = &(inputData_.queue.ring[inputData_.queue.front].bytes);
-  message->assign( bytes->begin(), bytes->end() );
-  double deltaTime = inputData_.queue.ring[inputData_.queue.front].timeStamp;
-  inputData_.queue.size--;
-  inputData_.queue.front++;
-  if ( inputData_.queue.front == inputData_.queue.ringSize )
-    inputData_.queue.front = 0;
-
-  return deltaTime;
-}
-
-//*********************************************************************//
-//  Common MidiOutApi Definitions
-//*********************************************************************//
-
-MidiOutApi :: MidiOutApi( void )
-  : MidiApi()
-{
-}
-
-MidiOutApi :: ~MidiOutApi( void )
-{
-}
-
-// *************************************************** //
-//
-// OS/API-specific methods.
-//
-// *************************************************** //
-
-#if defined(__MACOSX_CORE__)
-
-// The CoreMIDI API is based on the use of a callback function for
-// MIDI input.  We convert the system specific time stamps to delta
-// time values.
-
-// OS-X CoreMIDI header files.
-#include <CoreMIDI/CoreMIDI.h>
-#include <CoreAudio/HostTime.h>
-#include <CoreServices/CoreServices.h>
-
-// A structure to hold variables related to the CoreMIDI API
-// implementation.
-struct CoreMidiData {
-  MIDIClientRef client;
-  MIDIPortRef port;
-  MIDIEndpointRef endpoint;
-  MIDIEndpointRef destinationId;
-  unsigned long long lastTime;
-  MIDISysexSendRequest sysexreq;
-};
-
-//*********************************************************************//
-//  API: OS-X
-//  Class Definitions: MidiInCore
-//*********************************************************************//
-
-static void midiInputCallback( const MIDIPacketList *list, void *procRef, void */*srcRef*/ )
-{
-  MidiInApi::RtMidiInData *data = static_cast<MidiInApi::RtMidiInData *> (procRef);
-  CoreMidiData *apiData = static_cast<CoreMidiData *> (data->apiData);
-
-  unsigned char status;
-  unsigned short nBytes, iByte, size;
-  unsigned long long time;
-
-  bool& continueSysex = data->continueSysex;
-  MidiInApi::MidiMessage& message = data->message;
-
-  const MIDIPacket *packet = &list->packet[0];
-  for ( unsigned int i=0; i<list->numPackets; ++i ) {
-
-    // My interpretation of the CoreMIDI documentation: all message
-    // types, except sysex, are complete within a packet and there may
-    // be several of them in a single packet.  Sysex messages can be
-    // broken across multiple packets and PacketLists but are bundled
-    // alone within each packet (these packets do not contain other
-    // message types).  If sysex messages are split across multiple
-    // MIDIPacketLists, they must be handled by multiple calls to this
-    // function.
-
-    nBytes = packet->length;
-    if ( nBytes == 0 ) continue;
-
-    // Calculate time stamp.
-
-    if ( data->firstMessage ) {
-      message.timeStamp = 0.0;
-      data->firstMessage = false;
-    }
-    else {
-      time = packet->timeStamp;
-      if ( time == 0 ) { // this happens when receiving asynchronous sysex messages
-        time = AudioGetCurrentHostTime();
-      }
-      time -= apiData->lastTime;
-      time = AudioConvertHostTimeToNanos( time );
-      if ( !continueSysex )
-        message.timeStamp = time * 0.000000001;
-    }
-    apiData->lastTime = packet->timeStamp;
-    if ( apiData->lastTime == 0 ) { // this happens when receiving asynchronous sysex messages
-      apiData->lastTime = AudioGetCurrentHostTime();
-    }
-    //std::cout << "TimeStamp = " << packet->timeStamp << std::endl;
-
-    iByte = 0;
-    if ( continueSysex ) {
-      // We have a continuing, segmented sysex message.
-      if ( !( data->ignoreFlags & 0x01 ) ) {
-        // If we're not ignoring sysex messages, copy the entire packet.
-        for ( unsigned int j=0; j<nBytes; ++j )
-          message.bytes.push_back( packet->data[j] );
-      }
-      continueSysex = packet->data[nBytes-1] != 0xF7;
-
-      if ( !( data->ignoreFlags & 0x01 ) && !continueSysex ) {
-        // If not a continuing sysex message, invoke the user callback function or queue the message.
-        if ( data->usingCallback ) {
-          RtMidiIn::RtMidiCallback callback = (RtMidiIn::RtMidiCallback) data->userCallback;
-          callback( message.timeStamp, &message.bytes, data->userData );
-        }
-        else {
-          // As long as we haven't reached our queue size limit, push the message.
-          if ( data->queue.size < data->queue.ringSize ) {
-            data->queue.ring[data->queue.back++] = message;
-            if ( data->queue.back == data->queue.ringSize )
-              data->queue.back = 0;
-            data->queue.size++;
-          }
-          else
-            std::cerr << "\nMidiInCore: message queue limit reached!!\n\n";
-        }
-        message.bytes.clear();
-      }
-    }
-    else {
-      while ( iByte < nBytes ) {
-        size = 0;
-        // We are expecting that the next byte in the packet is a status byte.
-        status = packet->data[iByte];
-        if ( !(status & 0x80) ) break;
-        // Determine the number of bytes in the MIDI message.
-        if ( status < 0xC0 ) size = 3;
-        else if ( status < 0xE0 ) size = 2;
-        else if ( status < 0xF0 ) size = 3;
-        else if ( status == 0xF0 ) {
-          // A MIDI sysex
-          if ( data->ignoreFlags & 0x01 ) {
-            size = 0;
-            iByte = nBytes;
-          }
-          else size = nBytes - iByte;
-          continueSysex = packet->data[nBytes-1] != 0xF7;
-        }
-        else if ( status == 0xF1 ) {
-            // A MIDI time code message
-           if ( data->ignoreFlags & 0x02 ) {
-            size = 0;
-            iByte += 2;
-           }
-           else size = 2;
-        }
-        else if ( status == 0xF2 ) size = 3;
-        else if ( status == 0xF3 ) size = 2;
-        else if ( status == 0xF8 && ( data->ignoreFlags & 0x02 ) ) {
-          // A MIDI timing tick message and we're ignoring it.
-          size = 0;
-          iByte += 1;
-        }
-        else if ( status == 0xFE && ( data->ignoreFlags & 0x04 ) ) {
-          // A MIDI active sensing message and we're ignoring it.
-          size = 0;
-          iByte += 1;
-        }
-        else size = 1;
-
-        // Copy the MIDI data to our vector.
-        if ( size ) {
-          message.bytes.assign( &packet->data[iByte], &packet->data[iByte+size] );
-          if ( !continueSysex ) {
-            // If not a continuing sysex message, invoke the user callback function or queue the message.
-            if ( data->usingCallback ) {
-              RtMidiIn::RtMidiCallback callback = (RtMidiIn::RtMidiCallback) data->userCallback;
-              callback( message.timeStamp, &message.bytes, data->userData );
-            }
-            else {
-              // As long as we haven't reached our queue size limit, push the message.
-              if ( data->queue.size < data->queue.ringSize ) {
-                data->queue.ring[data->queue.back++] = message;
-                if ( data->queue.back == data->queue.ringSize )
-                  data->queue.back = 0;
-                data->queue.size++;
-              }
-              else
-                std::cerr << "\nMidiInCore: message queue limit reached!!\n\n";
-            }
-            message.bytes.clear();
-          }
-          iByte += size;
-        }
-      }
-    }
-    packet = MIDIPacketNext(packet);
-  }
-}
-
-MidiInCore :: MidiInCore( const std::string clientName, unsigned int queueSizeLimit ) : MidiInApi( queueSizeLimit )
-{
-  initialize( clientName );
-}
-
-MidiInCore :: ~MidiInCore( void )
-{
-  // Close a connection if it exists.
-  closePort();
-
-  // Cleanup.
-  CoreMidiData *data = static_cast<CoreMidiData *> (apiData_);
-  MIDIClientDispose( data->client );
-  if ( data->endpoint ) MIDIEndpointDispose( data->endpoint );
-  delete data;
-}
-
-void MidiInCore :: initialize( const std::string& clientName )
-{
-  // Set up our client.
-  MIDIClientRef client;
-  CFStringRef name = CFStringCreateWithCString( NULL, clientName.c_str(), kCFStringEncodingASCII );
-  OSStatus result = MIDIClientCreate(name, NULL, NULL, &client );
-  if ( result != noErr ) {
-    errorString_ = "MidiInCore::initialize: error creating OS-X MIDI client object.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Save our api-specific connection information.
-  CoreMidiData *data = (CoreMidiData *) new CoreMidiData;
-  data->client = client;
-  data->endpoint = 0;
-  apiData_ = (void *) data;
-  inputData_.apiData = (void *) data;
-  CFRelease(name);
-}
-
-void MidiInCore :: openPort( unsigned int portNumber, const std::string portName )
-{
-  if ( connected_ ) {
-    errorString_ = "MidiInCore::openPort: a valid connection already exists!";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
-  unsigned int nSrc = MIDIGetNumberOfSources();
-  if (nSrc < 1) {
-    errorString_ = "MidiInCore::openPort: no MIDI input sources found!";
-    error( RtMidiError::NO_DEVICES_FOUND, errorString_ );
-    return;
-  }
-
-  if ( portNumber >= nSrc ) {
-    std::ostringstream ost;
-    ost << "MidiInCore::openPort: the 'portNumber' argument (" << portNumber << ") is invalid.";
-    errorString_ = ost.str();
-    error( RtMidiError::INVALID_PARAMETER, errorString_ );
-    return;
-  }
-
-  MIDIPortRef port;
-  CoreMidiData *data = static_cast<CoreMidiData *> (apiData_);
-  OSStatus result = MIDIInputPortCreate( data->client, 
-                                         CFStringCreateWithCString( NULL, portName.c_str(), kCFStringEncodingASCII ),
-                                         midiInputCallback, (void *)&inputData_, &port );
-  if ( result != noErr ) {
-    MIDIClientDispose( data->client );
-    errorString_ = "MidiInCore::openPort: error creating OS-X MIDI input port.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Get the desired input source identifier.
-  MIDIEndpointRef endpoint = MIDIGetSource( portNumber );
-  if ( endpoint == 0 ) {
-    MIDIPortDispose( port );
-    MIDIClientDispose( data->client );
-    errorString_ = "MidiInCore::openPort: error getting MIDI input source reference.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Make the connection.
-  result = MIDIPortConnectSource( port, endpoint, NULL );
-  if ( result != noErr ) {
-    MIDIPortDispose( port );
-    MIDIClientDispose( data->client );
-    errorString_ = "MidiInCore::openPort: error connecting OS-X MIDI input port.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Save our api-specific port information.
-  data->port = port;
-
-  connected_ = true;
-}
-
-void MidiInCore :: openVirtualPort( const std::string portName )
-{
-  CoreMidiData *data = static_cast<CoreMidiData *> (apiData_);
-
-  // Create a virtual MIDI input destination.
-  MIDIEndpointRef endpoint;
-  OSStatus result = MIDIDestinationCreate( data->client,
-                                           CFStringCreateWithCString( NULL, portName.c_str(), kCFStringEncodingASCII ),
-                                           midiInputCallback, (void *)&inputData_, &endpoint );
-  if ( result != noErr ) {
-    errorString_ = "MidiInCore::openVirtualPort: error creating virtual OS-X MIDI destination.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Save our api-specific connection information.
-  data->endpoint = endpoint;
-}
-
-void MidiInCore :: closePort( void )
-{
-  if ( connected_ ) {
-    CoreMidiData *data = static_cast<CoreMidiData *> (apiData_);
-    MIDIPortDispose( data->port );
-    connected_ = false;
-  }
-}
-
-unsigned int MidiInCore :: getPortCount()
-{
-  CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
-  return MIDIGetNumberOfSources();
-}
-
-// This function was submitted by Douglas Casey Tucker and apparently
-// derived largely from PortMidi.
-CFStringRef EndpointName( MIDIEndpointRef endpoint, bool isExternal )
-{
-  CFMutableStringRef result = CFStringCreateMutable( NULL, 0 );
-  CFStringRef str;
-
-  // Begin with the endpoint's name.
-  str = NULL;
-  MIDIObjectGetStringProperty( endpoint, kMIDIPropertyName, &str );
-  if ( str != NULL ) {
-    CFStringAppend( result, str );
-    CFRelease( str );
-  }
-
-  MIDIEntityRef entity = 0;
-  MIDIEndpointGetEntity( endpoint, &entity );
-  if ( entity == 0 )
-    // probably virtual
-    return result;
-
-  if ( CFStringGetLength( result ) == 0 ) {
-    // endpoint name has zero length -- try the entity
-    str = NULL;
-    MIDIObjectGetStringProperty( entity, kMIDIPropertyName, &str );
-    if ( str != NULL ) {
-      CFStringAppend( result, str );
-      CFRelease( str );
-    }
-  }
-  // now consider the device's name
-  MIDIDeviceRef device = 0;
-  MIDIEntityGetDevice( entity, &device );
-  if ( device == 0 )
-    return result;
-
-  str = NULL;
-  MIDIObjectGetStringProperty( device, kMIDIPropertyName, &str );
-  if ( CFStringGetLength( result ) == 0 ) {
-      CFRelease( result );
-      return str;
-  }
-  if ( str != NULL ) {
-    // if an external device has only one entity, throw away
-    // the endpoint name and just use the device name
-    if ( isExternal && MIDIDeviceGetNumberOfEntities( device ) < 2 ) {
-      CFRelease( result );
-      return str;
-    } else {
-      if ( CFStringGetLength( str ) == 0 ) {
-        CFRelease( str );
-        return result;
-      }
-      // does the entity name already start with the device name?
-      // (some drivers do this though they shouldn't)
-      // if so, do not prepend
-        if ( CFStringCompareWithOptions( result, /* endpoint name */
-             str /* device name */,
-             CFRangeMake(0, CFStringGetLength( str ) ), 0 ) != kCFCompareEqualTo ) {
-        // prepend the device name to the entity name
-        if ( CFStringGetLength( result ) > 0 )
-          CFStringInsert( result, 0, CFSTR(" ") );
-        CFStringInsert( result, 0, str );
-      }
-      CFRelease( str );
-    }
-  }
-  return result;
-}
-
-// This function was submitted by Douglas Casey Tucker and apparently
-// derived largely from PortMidi.
-static CFStringRef ConnectedEndpointName( MIDIEndpointRef endpoint )
-{
-  CFMutableStringRef result = CFStringCreateMutable( NULL, 0 );
-  CFStringRef str;
-  OSStatus err;
-  int i;
-
-  // Does the endpoint have connections?
-  CFDataRef connections = NULL;
-  int nConnected = 0;
-  bool anyStrings = false;
-  err = MIDIObjectGetDataProperty( endpoint, kMIDIPropertyConnectionUniqueID, &connections );
-  if ( connections != NULL ) {
-    // It has connections, follow them
-    // Concatenate the names of all connected devices
-    nConnected = CFDataGetLength( connections ) / sizeof(MIDIUniqueID);
-    if ( nConnected ) {
-      const SInt32 *pid = (const SInt32 *)(CFDataGetBytePtr(connections));
-      for ( i=0; i<nConnected; ++i, ++pid ) {
-        MIDIUniqueID id = EndianS32_BtoN( *pid );
-        MIDIObjectRef connObject;
-        MIDIObjectType connObjectType;
-        err = MIDIObjectFindByUniqueID( id, &connObject, &connObjectType );
-        if ( err == noErr ) {
-          if ( connObjectType == kMIDIObjectType_ExternalSource  ||
-              connObjectType == kMIDIObjectType_ExternalDestination ) {
-            // Connected to an external device's endpoint (10.3 and later).
-            str = EndpointName( (MIDIEndpointRef)(connObject), true );
-          } else {
-            // Connected to an external device (10.2) (or something else, catch-
-            str = NULL;
-            MIDIObjectGetStringProperty( connObject, kMIDIPropertyName, &str );
-          }
-          if ( str != NULL ) {
-            if ( anyStrings )
-              CFStringAppend( result, CFSTR(", ") );
-            else anyStrings = true;
-            CFStringAppend( result, str );
-            CFRelease( str );
-          }
-        }
-      }
-    }
-    CFRelease( connections );
-  }
-  if ( anyStrings )
-    return result;
-
-  CFRelease( result );
-
-  // Here, either the endpoint had no connections, or we failed to obtain names 
-  return EndpointName( endpoint, false );
-}
-
-std::string MidiInCore :: getPortName( unsigned int portNumber )
-{
-  CFStringRef nameRef;
-  MIDIEndpointRef portRef;
-  char name[128];
-
-  std::string stringName;
-  CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
-  if ( portNumber >= MIDIGetNumberOfSources() ) {
-    std::ostringstream ost;
-    ost << "MidiInCore::getPortName: the 'portNumber' argument (" << portNumber << ") is invalid.";
-    errorString_ = ost.str();
-    error( RtMidiError::WARNING, errorString_ );
-    return stringName;
-  }
-
-  portRef = MIDIGetSource( portNumber );
-  nameRef = ConnectedEndpointName(portRef);
-  CFStringGetCString( nameRef, name, sizeof(name), CFStringGetSystemEncoding());
-  CFRelease( nameRef );
-
-  return stringName = name;
-}
-
-//*********************************************************************//
-//  API: OS-X
-//  Class Definitions: MidiOutCore
-//*********************************************************************//
-
-MidiOutCore :: MidiOutCore( const std::string clientName ) : MidiOutApi()
-{
-  initialize( clientName );
-}
-
-MidiOutCore :: ~MidiOutCore( void )
-{
-  // Close a connection if it exists.
-  closePort();
-
-  // Cleanup.
-  CoreMidiData *data = static_cast<CoreMidiData *> (apiData_);
-  MIDIClientDispose( data->client );
-  if ( data->endpoint ) MIDIEndpointDispose( data->endpoint );
-  delete data;
-}
-
-void MidiOutCore :: initialize( const std::string& clientName )
-{
-  // Set up our client.
-  MIDIClientRef client;
-  CFStringRef name = CFStringCreateWithCString( NULL, clientName.c_str(), kCFStringEncodingASCII );
-  OSStatus result = MIDIClientCreate(name, NULL, NULL, &client );
-  if ( result != noErr ) {
-    errorString_ = "MidiOutCore::initialize: error creating OS-X MIDI client object.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Save our api-specific connection information.
-  CoreMidiData *data = (CoreMidiData *) new CoreMidiData;
-  data->client = client;
-  data->endpoint = 0;
-  apiData_ = (void *) data;
-  CFRelease( name );
-}
-
-unsigned int MidiOutCore :: getPortCount()
-{
-  CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
-  return MIDIGetNumberOfDestinations();
-}
-
-std::string MidiOutCore :: getPortName( unsigned int portNumber )
-{
-  CFStringRef nameRef;
-  MIDIEndpointRef portRef;
-  char name[128];
-
-  std::string stringName;
-  CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
-  if ( portNumber >= MIDIGetNumberOfDestinations() ) {
-    std::ostringstream ost;
-    ost << "MidiOutCore::getPortName: the 'portNumber' argument (" << portNumber << ") is invalid.";
-    errorString_ = ost.str();
-    error( RtMidiError::WARNING, errorString_ );
-    return stringName;
-  }
-
-  portRef = MIDIGetDestination( portNumber );
-  nameRef = ConnectedEndpointName(portRef);
-  CFStringGetCString( nameRef, name, sizeof(name), CFStringGetSystemEncoding());
-  CFRelease( nameRef );
-  
-  return stringName = name;
-}
-
-void MidiOutCore :: openPort( unsigned int portNumber, const std::string portName )
-{
-  if ( connected_ ) {
-    errorString_ = "MidiOutCore::openPort: a valid connection already exists!";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
-  unsigned int nDest = MIDIGetNumberOfDestinations();
-  if (nDest < 1) {
-    errorString_ = "MidiOutCore::openPort: no MIDI output destinations found!";
-    error( RtMidiError::NO_DEVICES_FOUND, errorString_ );
-    return;
-  }
-
-  if ( portNumber >= nDest ) {
-    std::ostringstream ost;
-    ost << "MidiOutCore::openPort: the 'portNumber' argument (" << portNumber << ") is invalid.";
-    errorString_ = ost.str();
-    error( RtMidiError::INVALID_PARAMETER, errorString_ );
-    return;
-  }
-
-  MIDIPortRef port;
-  CoreMidiData *data = static_cast<CoreMidiData *> (apiData_);
-  OSStatus result = MIDIOutputPortCreate( data->client, 
-                                          CFStringCreateWithCString( NULL, portName.c_str(), kCFStringEncodingASCII ),
-                                          &port );
-  if ( result != noErr ) {
-    MIDIClientDispose( data->client );
-    errorString_ = "MidiOutCore::openPort: error creating OS-X MIDI output port.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Get the desired output port identifier.
-  MIDIEndpointRef destination = MIDIGetDestination( portNumber );
-  if ( destination == 0 ) {
-    MIDIPortDispose( port );
-    MIDIClientDispose( data->client );
-    errorString_ = "MidiOutCore::openPort: error getting MIDI output destination reference.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Save our api-specific connection information.
-  data->port = port;
-  data->destinationId = destination;
-  connected_ = true;
-}
-
-void MidiOutCore :: closePort( void )
-{
-  if ( connected_ ) {
-    CoreMidiData *data = static_cast<CoreMidiData *> (apiData_);
-    MIDIPortDispose( data->port );
-    connected_ = false;
-  }
-}
-
-void MidiOutCore :: openVirtualPort( std::string portName )
-{
-  CoreMidiData *data = static_cast<CoreMidiData *> (apiData_);
-
-  if ( data->endpoint ) {
-    errorString_ = "MidiOutCore::openVirtualPort: a virtual output port already exists!";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  // Create a virtual MIDI output source.
-  MIDIEndpointRef endpoint;
-  OSStatus result = MIDISourceCreate( data->client,
-                                      CFStringCreateWithCString( NULL, portName.c_str(), kCFStringEncodingASCII ),
-                                      &endpoint );
-  if ( result != noErr ) {
-    errorString_ = "MidiOutCore::initialize: error creating OS-X virtual MIDI source.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Save our api-specific connection information.
-  data->endpoint = endpoint;
-}
-
-void MidiOutCore :: sendMessage( std::vector<unsigned char> *message )
-{
-  // We use the MIDISendSysex() function to asynchronously send sysex
-  // messages.  Otherwise, we use a single CoreMidi MIDIPacket.
-  unsigned int nBytes = message->size();
-  if ( nBytes == 0 ) {
-    errorString_ = "MidiOutCore::sendMessage: no data in message argument!";      
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  MIDITimeStamp timeStamp = AudioGetCurrentHostTime();
-  CoreMidiData *data = static_cast<CoreMidiData *> (apiData_);
-  OSStatus result;
-
-  if ( message->at(0) != 0xF0 && nBytes > 3 ) {
-    errorString_ = "MidiOutCore::sendMessage: message format problem ... not sysex but > 3 bytes?";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  Byte buffer[nBytes+(sizeof(MIDIPacketList))];
-  ByteCount listSize = sizeof(buffer);
-  MIDIPacketList *packetList = (MIDIPacketList*)buffer;
-  MIDIPacket *packet = MIDIPacketListInit( packetList );
-
-  ByteCount remainingBytes = nBytes;
-  while (remainingBytes && packet) {
-    ByteCount bytesForPacket = remainingBytes > 65535 ? 65535 : remainingBytes; // 65535 = maximum size of a MIDIPacket
-    const Byte* dataStartPtr = (const Byte *) &message->at( nBytes - remainingBytes );
-    packet = MIDIPacketListAdd( packetList, listSize, packet, timeStamp, bytesForPacket, dataStartPtr);
-    remainingBytes -= bytesForPacket; 
-  }
-
-  if ( !packet ) {
-    errorString_ = "MidiOutCore::sendMessage: could not allocate packet list";      
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Send to any destinations that may have connected to us.
-  if ( data->endpoint ) {
-    result = MIDIReceived( data->endpoint, packetList );
-    if ( result != noErr ) {
-      errorString_ = "MidiOutCore::sendMessage: error sending MIDI to virtual destinations.";
-      error( RtMidiError::WARNING, errorString_ );
-    }
-  }
-
-  // And send to an explicit destination port if we're connected.
-  if ( connected_ ) {
-    result = MIDISend( data->port, data->destinationId, packetList );
-    if ( result != noErr ) {
-      errorString_ = "MidiOutCore::sendMessage: error sending MIDI message to port.";
-      error( RtMidiError::WARNING, errorString_ );
-    }
-  }
-}
-
-#endif  // __MACOSX_CORE__
-
-
-//*********************************************************************//
-//  API: LINUX ALSA SEQUENCER
-//*********************************************************************//
-
-// API information found at:
-//   - http://www.alsa-project.org/documentation.php#Library
-
-#if defined(__LINUX_ALSA__)
-
-// The ALSA Sequencer API is based on the use of a callback function for
-// MIDI input.
-//
-// Thanks to Pedro Lopez-Cabanillas for help with the ALSA sequencer
-// time stamps and other assorted fixes!!!
-
-// If you don't need timestamping for incoming MIDI events, define the
-// preprocessor definition AVOID_TIMESTAMPING to save resources
-// associated with the ALSA sequencer queues.
-
-#include <pthread.h>
-#include <sys/time.h>
-
-// ALSA header file.
-#include <alsa/asoundlib.h>
-
-// A structure to hold variables related to the ALSA API
-// implementation.
-struct AlsaMidiData {
-  snd_seq_t *seq;
-  unsigned int portNum;
-  int vport;
-  snd_seq_port_subscribe_t *subscription;
-  snd_midi_event_t *coder;
-  unsigned int bufferSize;
-  unsigned char *buffer;
-  pthread_t thread;
-  pthread_t dummy_thread_id;
-  unsigned long long lastTime;
-  int queue_id; // an input queue is needed to get timestamped events
-  int trigger_fds[2];
-};
-
-#define PORT_TYPE( pinfo, bits ) ((snd_seq_port_info_get_capability(pinfo) & (bits)) == (bits))
-
-//*********************************************************************//
-//  API: LINUX ALSA
-//  Class Definitions: MidiInAlsa
-//*********************************************************************//
-
-static void *alsaMidiHandler( void *ptr )
-{
-  MidiInApi::RtMidiInData *data = static_cast<MidiInApi::RtMidiInData *> (ptr);
-  AlsaMidiData *apiData = static_cast<AlsaMidiData *> (data->apiData);
-
-  long nBytes;
-  unsigned long long time, lastTime;
-  bool continueSysex = false;
-  bool doDecode = false;
-  MidiInApi::MidiMessage message;
-  int poll_fd_count;
-  struct pollfd *poll_fds;
-
-  snd_seq_event_t *ev;
-  int result;
-  apiData->bufferSize = 32;
-  result = snd_midi_event_new( 0, &apiData->coder );
-  if ( result < 0 ) {
-    data->doInput = false;
-    std::cerr << "\nMidiInAlsa::alsaMidiHandler: error initializing MIDI event parser!\n\n";
-    return 0;
-  }
-  unsigned char *buffer = (unsigned char *) malloc( apiData->bufferSize );
-  if ( buffer == NULL ) {
-    data->doInput = false;
-    snd_midi_event_free( apiData->coder );
-    apiData->coder = 0;
-    std::cerr << "\nMidiInAlsa::alsaMidiHandler: error initializing buffer memory!\n\n";
-    return 0;
-  }
-  snd_midi_event_init( apiData->coder );
-  snd_midi_event_no_status( apiData->coder, 1 ); // suppress running status messages
-
-  poll_fd_count = snd_seq_poll_descriptors_count( apiData->seq, POLLIN ) + 1;
-  poll_fds = (struct pollfd*)alloca( poll_fd_count * sizeof( struct pollfd ));
-  snd_seq_poll_descriptors( apiData->seq, poll_fds + 1, poll_fd_count - 1, POLLIN );
-  poll_fds[0].fd = apiData->trigger_fds[0];
-  poll_fds[0].events = POLLIN;
-
-  while ( data->doInput ) {
-
-    if ( snd_seq_event_input_pending( apiData->seq, 1 ) == 0 ) {
-      // No data pending
-      if ( poll( poll_fds, poll_fd_count, -1) >= 0 ) {
-        if ( poll_fds[0].revents & POLLIN ) {
-          bool dummy;
-          int res = read( poll_fds[0].fd, &dummy, sizeof(dummy) );
-          (void) res;
-        }
-      }
-      continue;
-    }
-
-    // If here, there should be data.
-    result = snd_seq_event_input( apiData->seq, &ev );
-    if ( result == -ENOSPC ) {
-      std::cerr << "\nMidiInAlsa::alsaMidiHandler: MIDI input buffer overrun!\n\n";
-      continue;
-    }
-    else if ( result <= 0 ) {
-      std::cerr << "\nMidiInAlsa::alsaMidiHandler: unknown MIDI input error!\n";
-      perror("System reports");
-      continue;
-    }
-
-    // This is a bit weird, but we now have to decode an ALSA MIDI
-    // event (back) into MIDI bytes.  We'll ignore non-MIDI types.
-    if ( !continueSysex ) message.bytes.clear();
-
-    doDecode = false;
-    switch ( ev->type ) {
-
-    case SND_SEQ_EVENT_PORT_SUBSCRIBED:
-#if defined(__RTMIDI_DEBUG__)
-      std::cout << "MidiInAlsa::alsaMidiHandler: port connection made!\n";
-#endif
-      break;
-
-    case SND_SEQ_EVENT_PORT_UNSUBSCRIBED:
-#if defined(__RTMIDI_DEBUG__)
-      std::cerr << "MidiInAlsa::alsaMidiHandler: port connection has closed!\n";
-      std::cout << "sender = " << (int) ev->data.connect.sender.client << ":"
-                << (int) ev->data.connect.sender.port
-                << ", dest = " << (int) ev->data.connect.dest.client << ":"
-                << (int) ev->data.connect.dest.port
-                << std::endl;
-#endif
-      break;
-
-    case SND_SEQ_EVENT_QFRAME: // MIDI time code
-      if ( !( data->ignoreFlags & 0x02 ) ) doDecode = true;
-      break;
-
-    case SND_SEQ_EVENT_TICK: // 0xF9 ... MIDI timing tick
-      if ( !( data->ignoreFlags & 0x02 ) ) doDecode = true;
-      break;
-
-    case SND_SEQ_EVENT_CLOCK: // 0xF8 ... MIDI timing (clock) tick
-      if ( !( data->ignoreFlags & 0x02 ) ) doDecode = true;
-      break;
-
-    case SND_SEQ_EVENT_SENSING: // Active sensing
-      if ( !( data->ignoreFlags & 0x04 ) ) doDecode = true;
-      break;
-
-		case SND_SEQ_EVENT_SYSEX:
-      if ( (data->ignoreFlags & 0x01) ) break;
-      if ( ev->data.ext.len > apiData->bufferSize ) {
-        apiData->bufferSize = ev->data.ext.len;
-        free( buffer );
-        buffer = (unsigned char *) malloc( apiData->bufferSize );
-        if ( buffer == NULL ) {
-          data->doInput = false;
-          std::cerr << "\nMidiInAlsa::alsaMidiHandler: error resizing buffer memory!\n\n";
-          break;
-        }
-      }
-
-    default:
-      doDecode = true;
-    }
-
-    if ( doDecode ) {
-
-      nBytes = snd_midi_event_decode( apiData->coder, buffer, apiData->bufferSize, ev );
-      if ( nBytes > 0 ) {
-        // The ALSA sequencer has a maximum buffer size for MIDI sysex
-        // events of 256 bytes.  If a device sends sysex messages larger
-        // than this, they are segmented into 256 byte chunks.  So,
-        // we'll watch for this and concatenate sysex chunks into a
-        // single sysex message if necessary.
-        if ( !continueSysex )
-          message.bytes.assign( buffer, &buffer[nBytes] );
-        else
-          message.bytes.insert( message.bytes.end(), buffer, &buffer[nBytes] );
-
-        continueSysex = ( ( ev->type == SND_SEQ_EVENT_SYSEX ) && ( message.bytes.back() != 0xF7 ) );
-        if ( !continueSysex ) {
-
-          // Calculate the time stamp:
-          message.timeStamp = 0.0;
-
-          // Method 1: Use the system time.
-          //(void)gettimeofday(&tv, (struct timezone *)NULL);
-          //time = (tv.tv_sec * 1000000) + tv.tv_usec;
-
-          // Method 2: Use the ALSA sequencer event time data.
-          // (thanks to Pedro Lopez-Cabanillas!).
-          time = ( ev->time.time.tv_sec * 1000000 ) + ( ev->time.time.tv_nsec/1000 );
-          lastTime = time;
-          time -= apiData->lastTime;
-          apiData->lastTime = lastTime;
-          if ( data->firstMessage == true )
-            data->firstMessage = false;
-          else
-            message.timeStamp = time * 0.000001;
-        }
-        else {
-#if defined(__RTMIDI_DEBUG__)
-          std::cerr << "\nMidiInAlsa::alsaMidiHandler: event parsing error or not a MIDI event!\n\n";
-#endif
-        }
-      }
-    }
-
-    snd_seq_free_event( ev );
-    if ( message.bytes.size() == 0 || continueSysex ) continue;
-
-    if ( data->usingCallback ) {
-      RtMidiIn::RtMidiCallback callback = (RtMidiIn::RtMidiCallback) data->userCallback;
-      callback( message.timeStamp, &message.bytes, data->userData );
-    }
-    else {
-      // As long as we haven't reached our queue size limit, push the message.
-      if ( data->queue.size < data->queue.ringSize ) {
-        data->queue.ring[data->queue.back++] = message;
-        if ( data->queue.back == data->queue.ringSize )
-          data->queue.back = 0;
-        data->queue.size++;
-      }
-      else
-        std::cerr << "\nMidiInAlsa: message queue limit reached!!\n\n";
-    }
-  }
-
-  if ( buffer ) free( buffer );
-  snd_midi_event_free( apiData->coder );
-  apiData->coder = 0;
-  apiData->thread = apiData->dummy_thread_id;
-  return 0;
-}
-
-MidiInAlsa :: MidiInAlsa( const std::string clientName, unsigned int queueSizeLimit ) : MidiInApi( queueSizeLimit )
-{
-  initialize( clientName );
-}
-
-MidiInAlsa :: ~MidiInAlsa()
-{
-  // Close a connection if it exists.
-  closePort();
-
-  // Shutdown the input thread.
-  AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
-  if ( inputData_.doInput ) {
-    inputData_.doInput = false;
-    int res = write( data->trigger_fds[1], &inputData_.doInput, sizeof(inputData_.doInput) );
-    (void) res;
-    if ( !pthread_equal(data->thread, data->dummy_thread_id) )
-      pthread_join( data->thread, NULL );
-  }
-
-  // Cleanup.
-  close ( data->trigger_fds[0] );
-  close ( data->trigger_fds[1] );
-  if ( data->vport >= 0 ) snd_seq_delete_port( data->seq, data->vport );
-#ifndef AVOID_TIMESTAMPING
-  snd_seq_free_queue( data->seq, data->queue_id );
-#endif
-  snd_seq_close( data->seq );
-  delete data;
-}
-
-void MidiInAlsa :: initialize( const std::string& clientName )
-{
-  // Set up the ALSA sequencer client.
-  snd_seq_t *seq;
-  int result = snd_seq_open(&seq, "default", SND_SEQ_OPEN_DUPLEX, SND_SEQ_NONBLOCK);
-  if ( result < 0 ) {
-    errorString_ = "MidiInAlsa::initialize: error creating ALSA sequencer client object.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Set client name.
-  snd_seq_set_client_name( seq, clientName.c_str() );
-
-  // Save our api-specific connection information.
-  AlsaMidiData *data = (AlsaMidiData *) new AlsaMidiData;
-  data->seq = seq;
-  data->portNum = -1;
-  data->vport = -1;
-  data->subscription = 0;
-  data->dummy_thread_id = pthread_self();
-  data->thread = data->dummy_thread_id;
-  data->trigger_fds[0] = -1;
-  data->trigger_fds[1] = -1;
-  apiData_ = (void *) data;
-  inputData_.apiData = (void *) data;
-
-   if ( pipe(data->trigger_fds) == -1 ) {
-    errorString_ = "MidiInAlsa::initialize: error creating pipe objects.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Create the input queue
-#ifndef AVOID_TIMESTAMPING
-  data->queue_id = snd_seq_alloc_named_queue(seq, "RtMidi Queue");
-  // Set arbitrary tempo (mm=100) and resolution (240)
-  snd_seq_queue_tempo_t *qtempo;
-  snd_seq_queue_tempo_alloca(&qtempo);
-  snd_seq_queue_tempo_set_tempo(qtempo, 600000);
-  snd_seq_queue_tempo_set_ppq(qtempo, 240);
-  snd_seq_set_queue_tempo(data->seq, data->queue_id, qtempo);
-  snd_seq_drain_output(data->seq);
-#endif
-}
-
-// This function is used to count or get the pinfo structure for a given port number.
-unsigned int portInfo( snd_seq_t *seq, snd_seq_port_info_t *pinfo, unsigned int type, int portNumber )
-{
-  snd_seq_client_info_t *cinfo;
-  int client;
-  int count = 0;
-  snd_seq_client_info_alloca( &cinfo );
-
-  snd_seq_client_info_set_client( cinfo, -1 );
-  while ( snd_seq_query_next_client( seq, cinfo ) >= 0 ) {
-    client = snd_seq_client_info_get_client( cinfo );
-    if ( client == 0 ) continue;
-    // Reset query info
-    snd_seq_port_info_set_client( pinfo, client );
-    snd_seq_port_info_set_port( pinfo, -1 );
-    while ( snd_seq_query_next_port( seq, pinfo ) >= 0 ) {
-      unsigned int atyp = snd_seq_port_info_get_type( pinfo );
-      if ( ( ( atyp & SND_SEQ_PORT_TYPE_MIDI_GENERIC ) == 0 ) &&
-        ( ( atyp & SND_SEQ_PORT_TYPE_SYNTH ) == 0 ) ) continue;
-      unsigned int caps = snd_seq_port_info_get_capability( pinfo );
-      if ( ( caps & type ) != type ) continue;
-      if ( count == portNumber ) return 1;
-      ++count;
-    }
-  }
-
-  // If a negative portNumber was used, return the port count.
-  if ( portNumber < 0 ) return count;
-  return 0;
-}
-
-unsigned int MidiInAlsa :: getPortCount()
-{
-  snd_seq_port_info_t *pinfo;
-  snd_seq_port_info_alloca( &pinfo );
-
-  AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
-  return portInfo( data->seq, pinfo, SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_SUBS_READ, -1 );
-}
-
-std::string MidiInAlsa :: getPortName( unsigned int portNumber )
-{
-  snd_seq_client_info_t *cinfo;
-  snd_seq_port_info_t *pinfo;
-  snd_seq_client_info_alloca( &cinfo );
-  snd_seq_port_info_alloca( &pinfo );
-
-  std::string stringName;
-  AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
-  if ( portInfo( data->seq, pinfo, SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_SUBS_READ, (int) portNumber ) ) {
-    int cnum = snd_seq_port_info_get_client( pinfo );
-    snd_seq_get_any_client_info( data->seq, cnum, cinfo );
-    std::ostringstream os;
-    os << snd_seq_client_info_get_name( cinfo );
-    os << " ";                                    // These lines added to make sure devices are listed
-    os << snd_seq_port_info_get_client( pinfo );  // with full portnames added to ensure individual device names
-    os << ":";
-    os << snd_seq_port_info_get_port( pinfo );
-    stringName = os.str();
-    return stringName;
-  }
-
-  // If we get here, we didn't find a match.
-  errorString_ = "MidiInAlsa::getPortName: error looking for port name!";
-  error( RtMidiError::WARNING, errorString_ );
-  return stringName;
-}
-
-void MidiInAlsa :: openPort( unsigned int portNumber, const std::string portName )
-{
-  if ( connected_ ) {
-    errorString_ = "MidiInAlsa::openPort: a valid connection already exists!";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  unsigned int nSrc = this->getPortCount();
-  if ( nSrc < 1 ) {
-    errorString_ = "MidiInAlsa::openPort: no MIDI input sources found!";
-    error( RtMidiError::NO_DEVICES_FOUND, errorString_ );
-    return;
-  }
-
-  snd_seq_port_info_t *src_pinfo;
-  snd_seq_port_info_alloca( &src_pinfo );
-  AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
-  if ( portInfo( data->seq, src_pinfo, SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_SUBS_READ, (int) portNumber ) == 0 ) {
-    std::ostringstream ost;
-    ost << "MidiInAlsa::openPort: the 'portNumber' argument (" << portNumber << ") is invalid.";
-    errorString_ = ost.str();
-    error( RtMidiError::INVALID_PARAMETER, errorString_ );
-    return;
-  }
-
-  snd_seq_addr_t sender, receiver;
-  sender.client = snd_seq_port_info_get_client( src_pinfo );
-  sender.port = snd_seq_port_info_get_port( src_pinfo );
-  receiver.client = snd_seq_client_id( data->seq );
-
-  snd_seq_port_info_t *pinfo;
-  snd_seq_port_info_alloca( &pinfo );
-  if ( data->vport < 0 ) {
-    snd_seq_port_info_set_client( pinfo, 0 );
-    snd_seq_port_info_set_port( pinfo, 0 );
-    snd_seq_port_info_set_capability( pinfo,
-                                      SND_SEQ_PORT_CAP_WRITE |
-                                      SND_SEQ_PORT_CAP_SUBS_WRITE );
-    snd_seq_port_info_set_type( pinfo,
-                                SND_SEQ_PORT_TYPE_MIDI_GENERIC |
-                                SND_SEQ_PORT_TYPE_APPLICATION );
-    snd_seq_port_info_set_midi_channels(pinfo, 16);
-#ifndef AVOID_TIMESTAMPING
-    snd_seq_port_info_set_timestamping(pinfo, 1);
-    snd_seq_port_info_set_timestamp_real(pinfo, 1);    
-    snd_seq_port_info_set_timestamp_queue(pinfo, data->queue_id);
-#endif
-    snd_seq_port_info_set_name(pinfo,  portName.c_str() );
-    data->vport = snd_seq_create_port(data->seq, pinfo);
-  
-    if ( data->vport < 0 ) {
-      errorString_ = "MidiInAlsa::openPort: ALSA error creating input port.";
-      error( RtMidiError::DRIVER_ERROR, errorString_ );
-      return;
-    }
-    data->vport = snd_seq_port_info_get_port(pinfo);
-  }
-
-  receiver.port = data->vport;
-
-  if ( !data->subscription ) {
-    // Make subscription
-    if (snd_seq_port_subscribe_malloc( &data->subscription ) < 0) {
-      errorString_ = "MidiInAlsa::openPort: ALSA error allocation port subscription.";
-      error( RtMidiError::DRIVER_ERROR, errorString_ );
-      return;
-    }
-    snd_seq_port_subscribe_set_sender(data->subscription, &sender);
-    snd_seq_port_subscribe_set_dest(data->subscription, &receiver);
-    if ( snd_seq_subscribe_port(data->seq, data->subscription) ) {
-      snd_seq_port_subscribe_free( data->subscription );
-      data->subscription = 0;
-      errorString_ = "MidiInAlsa::openPort: ALSA error making port connection.";
-      error( RtMidiError::DRIVER_ERROR, errorString_ );
-      return;
-    }
-  }
-
-  if ( inputData_.doInput == false ) {
-    // Start the input queue
-#ifndef AVOID_TIMESTAMPING
-    snd_seq_start_queue( data->seq, data->queue_id, NULL );
-    snd_seq_drain_output( data->seq );
-#endif
-    // Start our MIDI input thread.
-    pthread_attr_t attr;
-    pthread_attr_init(&attr);
-    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
-    pthread_attr_setschedpolicy(&attr, SCHED_OTHER);
-
-    inputData_.doInput = true;
-    int err = pthread_create(&data->thread, &attr, alsaMidiHandler, &inputData_);
-    pthread_attr_destroy(&attr);
-    if ( err ) {
-      snd_seq_unsubscribe_port( data->seq, data->subscription );
-      snd_seq_port_subscribe_free( data->subscription );
-      data->subscription = 0;
-      inputData_.doInput = false;
-      errorString_ = "MidiInAlsa::openPort: error starting MIDI input thread!";
-      error( RtMidiError::THREAD_ERROR, errorString_ );
-      return;
-    }
-  }
-
-  connected_ = true;
-}
-
-void MidiInAlsa :: openVirtualPort( std::string portName )
-{
-  AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
-  if ( data->vport < 0 ) {
-    snd_seq_port_info_t *pinfo;
-    snd_seq_port_info_alloca( &pinfo );
-    snd_seq_port_info_set_capability( pinfo,
-				      SND_SEQ_PORT_CAP_WRITE |
-				      SND_SEQ_PORT_CAP_SUBS_WRITE );
-    snd_seq_port_info_set_type( pinfo,
-				SND_SEQ_PORT_TYPE_MIDI_GENERIC |
-				SND_SEQ_PORT_TYPE_APPLICATION );
-    snd_seq_port_info_set_midi_channels(pinfo, 16);
-#ifndef AVOID_TIMESTAMPING
-    snd_seq_port_info_set_timestamping(pinfo, 1);
-    snd_seq_port_info_set_timestamp_real(pinfo, 1);    
-    snd_seq_port_info_set_timestamp_queue(pinfo, data->queue_id);
-#endif
-    snd_seq_port_info_set_name(pinfo, portName.c_str());
-    data->vport = snd_seq_create_port(data->seq, pinfo);
-
-    if ( data->vport < 0 ) {
-      errorString_ = "MidiInAlsa::openVirtualPort: ALSA error creating virtual port.";
-      error( RtMidiError::DRIVER_ERROR, errorString_ );
-      return;
-    }
-    data->vport = snd_seq_port_info_get_port(pinfo);
-  }
-
-  if ( inputData_.doInput == false ) {
-    // Wait for old thread to stop, if still running
-    if ( !pthread_equal(data->thread, data->dummy_thread_id) )
-      pthread_join( data->thread, NULL );
-
-    // Start the input queue
-#ifndef AVOID_TIMESTAMPING
-    snd_seq_start_queue( data->seq, data->queue_id, NULL );
-    snd_seq_drain_output( data->seq );
-#endif
-    // Start our MIDI input thread.
-    pthread_attr_t attr;
-    pthread_attr_init(&attr);
-    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
-    pthread_attr_setschedpolicy(&attr, SCHED_OTHER);
-
-    inputData_.doInput = true;
-    int err = pthread_create(&data->thread, &attr, alsaMidiHandler, &inputData_);
-    pthread_attr_destroy(&attr);
-    if ( err ) {
-      if ( data->subscription ) {
-        snd_seq_unsubscribe_port( data->seq, data->subscription );
-        snd_seq_port_subscribe_free( data->subscription );
-        data->subscription = 0;
-      }
-      inputData_.doInput = false;
-      errorString_ = "MidiInAlsa::openPort: error starting MIDI input thread!";
-      error( RtMidiError::THREAD_ERROR, errorString_ );
-      return;
-    }
-  }
-}
-
-void MidiInAlsa :: closePort( void )
-{
-  AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
-
-  if ( connected_ ) {
-    if ( data->subscription ) {
-      snd_seq_unsubscribe_port( data->seq, data->subscription );
-      snd_seq_port_subscribe_free( data->subscription );
-      data->subscription = 0;
-    }
-    // Stop the input queue
-#ifndef AVOID_TIMESTAMPING
-    snd_seq_stop_queue( data->seq, data->queue_id, NULL );
-    snd_seq_drain_output( data->seq );
-#endif
-    connected_ = false;
-  }
-
-  // Stop thread to avoid triggering the callback, while the port is intended to be closed
-  if ( inputData_.doInput ) {
-    inputData_.doInput = false;
-    int res = write( data->trigger_fds[1], &inputData_.doInput, sizeof(inputData_.doInput) );
-    (void) res;
-    if ( !pthread_equal(data->thread, data->dummy_thread_id) )
-      pthread_join( data->thread, NULL );
-  }
-}
-
-//*********************************************************************//
-//  API: LINUX ALSA
-//  Class Definitions: MidiOutAlsa
-//*********************************************************************//
-
-MidiOutAlsa :: MidiOutAlsa( const std::string clientName ) : MidiOutApi()
-{
-  initialize( clientName );
-}
-
-MidiOutAlsa :: ~MidiOutAlsa()
-{
-  // Close a connection if it exists.
-  closePort();
-
-  // Cleanup.
-  AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
-  if ( data->vport >= 0 ) snd_seq_delete_port( data->seq, data->vport );
-  if ( data->coder ) snd_midi_event_free( data->coder );
-  if ( data->buffer ) free( data->buffer );
-  snd_seq_close( data->seq );
-  delete data;
-}
-
-void MidiOutAlsa :: initialize( const std::string& clientName )
-{
-  // Set up the ALSA sequencer client.
-  snd_seq_t *seq;
-  int result1 = snd_seq_open( &seq, "default", SND_SEQ_OPEN_OUTPUT, SND_SEQ_NONBLOCK );
-  if ( result1 < 0 ) {
-    errorString_ = "MidiOutAlsa::initialize: error creating ALSA sequencer client object.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-	}
-
-  // Set client name.
-  snd_seq_set_client_name( seq, clientName.c_str() );
-
-  // Save our api-specific connection information.
-  AlsaMidiData *data = (AlsaMidiData *) new AlsaMidiData;
-  data->seq = seq;
-  data->portNum = -1;
-  data->vport = -1;
-  data->bufferSize = 32;
-  data->coder = 0;
-  data->buffer = 0;
-  int result = snd_midi_event_new( data->bufferSize, &data->coder );
-  if ( result < 0 ) {
-    delete data;
-    errorString_ = "MidiOutAlsa::initialize: error initializing MIDI event parser!\n\n";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-  data->buffer = (unsigned char *) malloc( data->bufferSize );
-  if ( data->buffer == NULL ) {
-    delete data;
-    errorString_ = "MidiOutAlsa::initialize: error allocating buffer memory!\n\n";
-    error( RtMidiError::MEMORY_ERROR, errorString_ );
-    return;
-  }
-  snd_midi_event_init( data->coder );
-  apiData_ = (void *) data;
-}
-
-unsigned int MidiOutAlsa :: getPortCount()
-{
-	snd_seq_port_info_t *pinfo;
-	snd_seq_port_info_alloca( &pinfo );
-
-  AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
-  return portInfo( data->seq, pinfo, SND_SEQ_PORT_CAP_WRITE|SND_SEQ_PORT_CAP_SUBS_WRITE, -1 );
-}
-
-std::string MidiOutAlsa :: getPortName( unsigned int portNumber )
-{
-  snd_seq_client_info_t *cinfo;
-  snd_seq_port_info_t *pinfo;
-  snd_seq_client_info_alloca( &cinfo );
-  snd_seq_port_info_alloca( &pinfo );
-
-  std::string stringName;
-  AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
-  if ( portInfo( data->seq, pinfo, SND_SEQ_PORT_CAP_WRITE|SND_SEQ_PORT_CAP_SUBS_WRITE, (int) portNumber ) ) {
-    int cnum = snd_seq_port_info_get_client(pinfo);
-    snd_seq_get_any_client_info( data->seq, cnum, cinfo );
-    std::ostringstream os;
-    os << snd_seq_client_info_get_name(cinfo);
-    os << " ";                                    // These lines added to make sure devices are listed
-    os << snd_seq_port_info_get_client( pinfo );  // with full portnames added to ensure individual device names
-    os << ":";
-    os << snd_seq_port_info_get_port(pinfo);
-    stringName = os.str();
-    return stringName;
-  }
-
-  // If we get here, we didn't find a match.
-  errorString_ = "MidiOutAlsa::getPortName: error looking for port name!";
-  error( RtMidiError::WARNING, errorString_ );
-  return stringName;
-}
-
-void MidiOutAlsa :: openPort( unsigned int portNumber, const std::string portName )
-{
-  if ( connected_ ) {
-    errorString_ = "MidiOutAlsa::openPort: a valid connection already exists!";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  unsigned int nSrc = this->getPortCount();
-  if (nSrc < 1) {
-    errorString_ = "MidiOutAlsa::openPort: no MIDI output sources found!";
-    error( RtMidiError::NO_DEVICES_FOUND, errorString_ );
-    return;
-  }
-
-	snd_seq_port_info_t *pinfo;
-	snd_seq_port_info_alloca( &pinfo );
-  AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
-  if ( portInfo( data->seq, pinfo, SND_SEQ_PORT_CAP_WRITE|SND_SEQ_PORT_CAP_SUBS_WRITE, (int) portNumber ) == 0 ) {
-    std::ostringstream ost;
-    ost << "MidiOutAlsa::openPort: the 'portNumber' argument (" << portNumber << ") is invalid.";
-    errorString_ = ost.str();
-    error( RtMidiError::INVALID_PARAMETER, errorString_ );
-    return;
-  }
-
-  snd_seq_addr_t sender, receiver;
-  receiver.client = snd_seq_port_info_get_client( pinfo );
-  receiver.port = snd_seq_port_info_get_port( pinfo );
-  sender.client = snd_seq_client_id( data->seq );
-
-  if ( data->vport < 0 ) {
-    data->vport = snd_seq_create_simple_port( data->seq, portName.c_str(),
-                                              SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_SUBS_READ,
-                                              SND_SEQ_PORT_TYPE_MIDI_GENERIC|SND_SEQ_PORT_TYPE_APPLICATION );
-    if ( data->vport < 0 ) {
-      errorString_ = "MidiOutAlsa::openPort: ALSA error creating output port.";
-      error( RtMidiError::DRIVER_ERROR, errorString_ );
-      return;
-    }
-  }
-
-  sender.port = data->vport;
-
-  // Make subscription
-  if (snd_seq_port_subscribe_malloc( &data->subscription ) < 0) {
-    snd_seq_port_subscribe_free( data->subscription );
-    errorString_ = "MidiOutAlsa::openPort: error allocating port subscription.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-  snd_seq_port_subscribe_set_sender(data->subscription, &sender);
-  snd_seq_port_subscribe_set_dest(data->subscription, &receiver);
-  snd_seq_port_subscribe_set_time_update(data->subscription, 1);
-  snd_seq_port_subscribe_set_time_real(data->subscription, 1);
-  if ( snd_seq_subscribe_port(data->seq, data->subscription) ) {
-    snd_seq_port_subscribe_free( data->subscription );
-    errorString_ = "MidiOutAlsa::openPort: ALSA error making port connection.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  connected_ = true;
-}
-
-void MidiOutAlsa :: closePort( void )
-{
-  if ( connected_ ) {
-    AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
-    snd_seq_unsubscribe_port( data->seq, data->subscription );
-    snd_seq_port_subscribe_free( data->subscription );
-    connected_ = false;
-  }
-}
-
-void MidiOutAlsa :: openVirtualPort( std::string portName )
-{
-  AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
-  if ( data->vport < 0 ) {
-    data->vport = snd_seq_create_simple_port( data->seq, portName.c_str(),
-                                              SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_SUBS_READ,
-                                              SND_SEQ_PORT_TYPE_MIDI_GENERIC|SND_SEQ_PORT_TYPE_APPLICATION );
-
-    if ( data->vport < 0 ) {
-      errorString_ = "MidiOutAlsa::openVirtualPort: ALSA error creating virtual port.";
-      error( RtMidiError::DRIVER_ERROR, errorString_ );
-    }
-  }
-}
-
-void MidiOutAlsa :: sendMessage( std::vector<unsigned char> *message )
-{
-  int result;
-  AlsaMidiData *data = static_cast<AlsaMidiData *> (apiData_);
-  unsigned int nBytes = message->size();
-  if ( nBytes > data->bufferSize ) {
-    data->bufferSize = nBytes;
-    result = snd_midi_event_resize_buffer ( data->coder, nBytes);
-    if ( result != 0 ) {
-      errorString_ = "MidiOutAlsa::sendMessage: ALSA error resizing MIDI event buffer.";
-      error( RtMidiError::DRIVER_ERROR, errorString_ );
-      return;
-    }
-    free (data->buffer);
-    data->buffer = (unsigned char *) malloc( data->bufferSize );
-    if ( data->buffer == NULL ) {
-    errorString_ = "MidiOutAlsa::initialize: error allocating buffer memory!\n\n";
-    error( RtMidiError::MEMORY_ERROR, errorString_ );
-    return;
-    }
-  }
-
-  snd_seq_event_t ev;
-  snd_seq_ev_clear(&ev);
-  snd_seq_ev_set_source(&ev, data->vport);
-  snd_seq_ev_set_subs(&ev);
-  snd_seq_ev_set_direct(&ev);
-  for ( unsigned int i=0; i<nBytes; ++i ) data->buffer[i] = message->at(i);
-  result = snd_midi_event_encode( data->coder, data->buffer, (long)nBytes, &ev );
-  if ( result < (int)nBytes ) {
-    errorString_ = "MidiOutAlsa::sendMessage: event parsing error!";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  // Send the event.
-  result = snd_seq_event_output(data->seq, &ev);
-  if ( result < 0 ) {
-    errorString_ = "MidiOutAlsa::sendMessage: error sending MIDI message to port.";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-  snd_seq_drain_output(data->seq);
-}
-
-#endif // __LINUX_ALSA__
-
-
-//*********************************************************************//
-//  API: Windows Multimedia Library (MM)
-//*********************************************************************//
-
-// API information deciphered from:
-//  - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_midi_reference.asp
-
-// Thanks to Jean-Baptiste Berruchon for the sysex code.
-
-#if defined(__WINDOWS_MM__)
-
-// The Windows MM API is based on the use of a callback function for
-// MIDI input.  We convert the system specific time stamps to delta
-// time values.
-
-// Windows MM MIDI header files.
-#include <windows.h>
-#include <mmsystem.h>
-
-#define  RT_SYSEX_BUFFER_SIZE 1024
-#define  RT_SYSEX_BUFFER_COUNT 4
-
-// A structure to hold variables related to the CoreMIDI API
-// implementation.
-struct WinMidiData {
-  HMIDIIN inHandle;    // Handle to Midi Input Device
-  HMIDIOUT outHandle;  // Handle to Midi Output Device
-  DWORD lastTime;
-  MidiInApi::MidiMessage message;
-  LPMIDIHDR sysexBuffer[RT_SYSEX_BUFFER_COUNT];
-  CRITICAL_SECTION _mutex; // [Patrice] see https://groups.google.com/forum/#!topic/mididev/6OUjHutMpEo
-};
-
-//*********************************************************************//
-//  API: Windows MM
-//  Class Definitions: MidiInWinMM
-//*********************************************************************//
-
-static void CALLBACK midiInputCallback( HMIDIIN /*hmin*/,
-                                        UINT inputStatus, 
-                                        DWORD_PTR instancePtr,
-                                        DWORD_PTR midiMessage,
-                                        DWORD timestamp )
-{
-  if ( inputStatus != MIM_DATA && inputStatus != MIM_LONGDATA && inputStatus != MIM_LONGERROR ) return;
-
-  //MidiInApi::RtMidiInData *data = static_cast<MidiInApi::RtMidiInData *> (instancePtr);
-  MidiInApi::RtMidiInData *data = (MidiInApi::RtMidiInData *)instancePtr;
-  WinMidiData *apiData = static_cast<WinMidiData *> (data->apiData);
-
-  // Calculate time stamp.
-  if ( data->firstMessage == true ) {
-    apiData->message.timeStamp = 0.0;
-    data->firstMessage = false;
-  }
-  else apiData->message.timeStamp = (double) ( timestamp - apiData->lastTime ) * 0.001;
-  apiData->lastTime = timestamp;
-
-  if ( inputStatus == MIM_DATA ) { // Channel or system message
-
-    // Make sure the first byte is a status byte.
-    unsigned char status = (unsigned char) (midiMessage & 0x000000FF);
-    if ( !(status & 0x80) ) return;
-
-    // Determine the number of bytes in the MIDI message.
-    unsigned short nBytes = 1;
-    if ( status < 0xC0 ) nBytes = 3;
-    else if ( status < 0xE0 ) nBytes = 2;
-    else if ( status < 0xF0 ) nBytes = 3;
-    else if ( status == 0xF1 ) {
-      if ( data->ignoreFlags & 0x02 ) return;
-      else nBytes = 2;
-    }
-    else if ( status == 0xF2 ) nBytes = 3;
-    else if ( status == 0xF3 ) nBytes = 2;
-    else if ( status == 0xF8 && (data->ignoreFlags & 0x02) ) {
-      // A MIDI timing tick message and we're ignoring it.
-      return;
-    }
-    else if ( status == 0xFE && (data->ignoreFlags & 0x04) ) {
-      // A MIDI active sensing message and we're ignoring it.
-      return;
-    }
-
-    // Copy bytes to our MIDI message.
-    unsigned char *ptr = (unsigned char *) &midiMessage;
-    for ( int i=0; i<nBytes; ++i ) apiData->message.bytes.push_back( *ptr++ );
-  }
-  else { // Sysex message ( MIM_LONGDATA or MIM_LONGERROR )
-    MIDIHDR *sysex = ( MIDIHDR *) midiMessage; 
-    if ( !( data->ignoreFlags & 0x01 ) && inputStatus != MIM_LONGERROR ) {  
-      // Sysex message and we're not ignoring it
-      for ( int i=0; i<(int)sysex->dwBytesRecorded; ++i )
-        apiData->message.bytes.push_back( sysex->lpData[i] );
-    }
-
-    // The WinMM API requires that the sysex buffer be requeued after
-    // input of each sysex message.  Even if we are ignoring sysex
-    // messages, we still need to requeue the buffer in case the user
-    // decides to not ignore sysex messages in the future.  However,
-    // it seems that WinMM calls this function with an empty sysex
-    // buffer when an application closes and in this case, we should
-    // avoid requeueing it, else the computer suddenly reboots after
-    // one or two minutes.
-    if ( apiData->sysexBuffer[sysex->dwUser]->dwBytesRecorded > 0 ) {
-      //if ( sysex->dwBytesRecorded > 0 ) {
-      EnterCriticalSection( &(apiData->_mutex) );
-      MMRESULT result = midiInAddBuffer( apiData->inHandle, apiData->sysexBuffer[sysex->dwUser], sizeof(MIDIHDR) );
-      LeaveCriticalSection( &(apiData->_mutex) );
-      if ( result != MMSYSERR_NOERROR )
-        std::cerr << "\nRtMidiIn::midiInputCallback: error sending sysex to Midi device!!\n\n";
-
-      if ( data->ignoreFlags & 0x01 ) return;
-    }
-    else return;
-  }
-
-  if ( data->usingCallback ) {
-    RtMidiIn::RtMidiCallback callback = (RtMidiIn::RtMidiCallback) data->userCallback;
-    callback( apiData->message.timeStamp, &apiData->message.bytes, data->userData );
-  }
-  else {
-    // As long as we haven't reached our queue size limit, push the message.
-    if ( data->queue.size < data->queue.ringSize ) {
-      data->queue.ring[data->queue.back++] = apiData->message;
-      if ( data->queue.back == data->queue.ringSize )
-        data->queue.back = 0;
-      data->queue.size++;
-    }
-    else
-      std::cerr << "\nRtMidiIn: message queue limit reached!!\n\n";
-  }
-
-  // Clear the vector for the next input message.
-  apiData->message.bytes.clear();
-}
-
-MidiInWinMM :: MidiInWinMM( const std::string clientName, unsigned int queueSizeLimit ) : MidiInApi( queueSizeLimit )
-{
-  initialize( clientName );
-}
-
-MidiInWinMM :: ~MidiInWinMM()
-{
-  // Close a connection if it exists.
-  closePort();
-
-  WinMidiData *data = static_cast<WinMidiData *> (apiData_);
-  DeleteCriticalSection( &(data->_mutex) );
-
-  // Cleanup.
-  delete data;
-}
-
-void MidiInWinMM :: initialize( const std::string& /*clientName*/ )
-{
-  // We'll issue a warning here if no devices are available but not
-  // throw an error since the user can plugin something later.
-  unsigned int nDevices = midiInGetNumDevs();
-  if ( nDevices == 0 ) {
-    errorString_ = "MidiInWinMM::initialize: no MIDI input devices currently available.";
-    error( RtMidiError::WARNING, errorString_ );
-  }
-
-  // Save our api-specific connection information.
-  WinMidiData *data = (WinMidiData *) new WinMidiData;
-  apiData_ = (void *) data;
-  inputData_.apiData = (void *) data;
-  data->message.bytes.clear();  // needs to be empty for first input message
-
-  if ( !InitializeCriticalSectionAndSpinCount(&(data->_mutex), 0x00000400) ) {
-    errorString_ = "MidiInWinMM::initialize: InitializeCriticalSectionAndSpinCount failed.";
-    error( RtMidiError::WARNING, errorString_ );
-  }
-}
-
-void MidiInWinMM :: openPort( unsigned int portNumber, const std::string /*portName*/ )
-{
-  if ( connected_ ) {
-    errorString_ = "MidiInWinMM::openPort: a valid connection already exists!";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  unsigned int nDevices = midiInGetNumDevs();
-  if (nDevices == 0) {
-    errorString_ = "MidiInWinMM::openPort: no MIDI input sources found!";
-    error( RtMidiError::NO_DEVICES_FOUND, errorString_ );
-    return;
-  }
-
-  if ( portNumber >= nDevices ) {
-    std::ostringstream ost;
-    ost << "MidiInWinMM::openPort: the 'portNumber' argument (" << portNumber << ") is invalid.";
-    errorString_ = ost.str();
-    error( RtMidiError::INVALID_PARAMETER, errorString_ );
-    return;
-  }
-
-  WinMidiData *data = static_cast<WinMidiData *> (apiData_);
-  MMRESULT result = midiInOpen( &data->inHandle,
-                                portNumber,
-                                (DWORD_PTR)&midiInputCallback,
-                                (DWORD_PTR)&inputData_,
-                                CALLBACK_FUNCTION );
-  if ( result != MMSYSERR_NOERROR ) {
-    errorString_ = "MidiInWinMM::openPort: error creating Windows MM MIDI input port.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Allocate and init the sysex buffers.
-  for ( int i=0; i<RT_SYSEX_BUFFER_COUNT; ++i ) {
-    data->sysexBuffer[i] = (MIDIHDR*) new char[ sizeof(MIDIHDR) ];
-    data->sysexBuffer[i]->lpData = new char[ RT_SYSEX_BUFFER_SIZE ];
-    data->sysexBuffer[i]->dwBufferLength = RT_SYSEX_BUFFER_SIZE;
-    data->sysexBuffer[i]->dwUser = i; // We use the dwUser parameter as buffer indicator
-    data->sysexBuffer[i]->dwFlags = 0;
-
-    result = midiInPrepareHeader( data->inHandle, data->sysexBuffer[i], sizeof(MIDIHDR) );
-    if ( result != MMSYSERR_NOERROR ) {
-      midiInClose( data->inHandle );
-      errorString_ = "MidiInWinMM::openPort: error starting Windows MM MIDI input port (PrepareHeader).";
-      error( RtMidiError::DRIVER_ERROR, errorString_ );
-      return;
-    }
-
-    // Register the buffer.
-    result = midiInAddBuffer( data->inHandle, data->sysexBuffer[i], sizeof(MIDIHDR) );
-    if ( result != MMSYSERR_NOERROR ) {
-      midiInClose( data->inHandle );
-      errorString_ = "MidiInWinMM::openPort: error starting Windows MM MIDI input port (AddBuffer).";
-      error( RtMidiError::DRIVER_ERROR, errorString_ );
-      return;
-    }
-  }
-
-  result = midiInStart( data->inHandle );
-  if ( result != MMSYSERR_NOERROR ) {
-    midiInClose( data->inHandle );
-    errorString_ = "MidiInWinMM::openPort: error starting Windows MM MIDI input port.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  connected_ = true;
-}
-
-void MidiInWinMM :: openVirtualPort( std::string /*portName*/ )
-{
-  // This function cannot be implemented for the Windows MM MIDI API.
-  errorString_ = "MidiInWinMM::openVirtualPort: cannot be implemented in Windows MM MIDI API!";
-  error( RtMidiError::WARNING, errorString_ );
-}
-
-void MidiInWinMM :: closePort( void )
-{
-  if ( connected_ ) {
-    WinMidiData *data = static_cast<WinMidiData *> (apiData_);
-    EnterCriticalSection( &(data->_mutex) );
-    midiInReset( data->inHandle );
-    midiInStop( data->inHandle );
-
-    for ( int i=0; i<RT_SYSEX_BUFFER_COUNT; ++i ) {
-      int result = midiInUnprepareHeader(data->inHandle, data->sysexBuffer[i], sizeof(MIDIHDR));
-      delete [] data->sysexBuffer[i]->lpData;
-      delete [] data->sysexBuffer[i];
-      if ( result != MMSYSERR_NOERROR ) {
-        midiInClose( data->inHandle );
-        errorString_ = "MidiInWinMM::openPort: error closing Windows MM MIDI input port (midiInUnprepareHeader).";
-        error( RtMidiError::DRIVER_ERROR, errorString_ );
-        return;
-      }
-    }
-
-    midiInClose( data->inHandle );
-    connected_ = false;
-    LeaveCriticalSection( &(data->_mutex) );
-  }
-}
-
-unsigned int MidiInWinMM :: getPortCount()
-{
-  return midiInGetNumDevs();
-}
-
-std::string MidiInWinMM :: getPortName( unsigned int portNumber )
-{
-  std::string stringName;
-  unsigned int nDevices = midiInGetNumDevs();
-  if ( portNumber >= nDevices ) {
-    std::ostringstream ost;
-    ost << "MidiInWinMM::getPortName: the 'portNumber' argument (" << portNumber << ") is invalid.";
-    errorString_ = ost.str();
-    error( RtMidiError::WARNING, errorString_ );
-    return stringName;
-  }
-
-  MIDIINCAPS deviceCaps;
-  midiInGetDevCaps( portNumber, &deviceCaps, sizeof(MIDIINCAPS));
-
-#if defined( UNICODE ) || defined( _UNICODE )
-  int length = WideCharToMultiByte(CP_UTF8, 0, deviceCaps.szPname, -1, NULL, 0, NULL, NULL) - 1;
-  stringName.assign( length, 0 );
-  length = WideCharToMultiByte(CP_UTF8, 0, deviceCaps.szPname, static_cast<int>(wcslen(deviceCaps.szPname)), &stringName[0], length, NULL, NULL);
-#else
-  stringName = std::string( deviceCaps.szPname );
-#endif
-
-  // Next lines added to add the portNumber to the name so that 
-  // the device's names are sure to be listed with individual names
-  // even when they have the same brand name
-  std::ostringstream os;
-  os << " ";
-  os << portNumber;
-  stringName += os.str();
-
-  return stringName;
-}
-
-//*********************************************************************//
-//  API: Windows MM
-//  Class Definitions: MidiOutWinMM
-//*********************************************************************//
-
-MidiOutWinMM :: MidiOutWinMM( const std::string clientName ) : MidiOutApi()
-{
-  initialize( clientName );
-}
-
-MidiOutWinMM :: ~MidiOutWinMM()
-{
-  // Close a connection if it exists.
-  closePort();
-
-  // Cleanup.
-  WinMidiData *data = static_cast<WinMidiData *> (apiData_);
-  delete data;
-}
-
-void MidiOutWinMM :: initialize( const std::string& /*clientName*/ )
-{
-  // We'll issue a warning here if no devices are available but not
-  // throw an error since the user can plug something in later.
-  unsigned int nDevices = midiOutGetNumDevs();
-  if ( nDevices == 0 ) {
-    errorString_ = "MidiOutWinMM::initialize: no MIDI output devices currently available.";
-    error( RtMidiError::WARNING, errorString_ );
-  }
-
-  // Save our api-specific connection information.
-  WinMidiData *data = (WinMidiData *) new WinMidiData;
-  apiData_ = (void *) data;
-}
-
-unsigned int MidiOutWinMM :: getPortCount()
-{
-  return midiOutGetNumDevs();
-}
-
-std::string MidiOutWinMM :: getPortName( unsigned int portNumber )
-{
-  std::string stringName;
-  unsigned int nDevices = midiOutGetNumDevs();
-  if ( portNumber >= nDevices ) {
-    std::ostringstream ost;
-    ost << "MidiOutWinMM::getPortName: the 'portNumber' argument (" << portNumber << ") is invalid.";
-    errorString_ = ost.str();
-    error( RtMidiError::WARNING, errorString_ );
-    return stringName;
-  }
-
-  MIDIOUTCAPS deviceCaps;
-  midiOutGetDevCaps( portNumber, &deviceCaps, sizeof(MIDIOUTCAPS));
-
-#if defined( UNICODE ) || defined( _UNICODE )
-  int length = WideCharToMultiByte(CP_UTF8, 0, deviceCaps.szPname, -1, NULL, 0, NULL, NULL) - 1;
-  stringName.assign( length, 0 );
-  length = WideCharToMultiByte(CP_UTF8, 0, deviceCaps.szPname, static_cast<int>(wcslen(deviceCaps.szPname)), &stringName[0], length, NULL, NULL);
-#else
-  stringName = std::string( deviceCaps.szPname );
-#endif
-
-  // Next lines added to add the portNumber to the name so that 
-  // the device's names are sure to be listed with individual names
-  // even when they have the same brand name
-  std::ostringstream os;
-  os << " ";
-  os << portNumber;
-  stringName += os.str();
-
-  return stringName;
-}
-
-void MidiOutWinMM :: openPort( unsigned int portNumber, const std::string /*portName*/ )
-{
-  if ( connected_ ) {
-    errorString_ = "MidiOutWinMM::openPort: a valid connection already exists!";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  unsigned int nDevices = midiOutGetNumDevs();
-  if (nDevices < 1) {
-    errorString_ = "MidiOutWinMM::openPort: no MIDI output destinations found!";
-    error( RtMidiError::NO_DEVICES_FOUND, errorString_ );
-    return;
-  }
-
-  if ( portNumber >= nDevices ) {
-    std::ostringstream ost;
-    ost << "MidiOutWinMM::openPort: the 'portNumber' argument (" << portNumber << ") is invalid.";
-    errorString_ = ost.str();
-    error( RtMidiError::INVALID_PARAMETER, errorString_ );
-    return;
-  }
-
-  WinMidiData *data = static_cast<WinMidiData *> (apiData_);
-  MMRESULT result = midiOutOpen( &data->outHandle,
-                                 portNumber,
-                                 (DWORD)NULL,
-                                 (DWORD)NULL,
-                                 CALLBACK_NULL );
-  if ( result != MMSYSERR_NOERROR ) {
-    errorString_ = "MidiOutWinMM::openPort: error creating Windows MM MIDI output port.";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  connected_ = true;
-}
-
-void MidiOutWinMM :: closePort( void )
-{
-  if ( connected_ ) {
-    WinMidiData *data = static_cast<WinMidiData *> (apiData_);
-    midiOutReset( data->outHandle );
-    midiOutClose( data->outHandle );
-    connected_ = false;
-  }
-}
-
-void MidiOutWinMM :: openVirtualPort( std::string /*portName*/ )
-{
-  // This function cannot be implemented for the Windows MM MIDI API.
-  errorString_ = "MidiOutWinMM::openVirtualPort: cannot be implemented in Windows MM MIDI API!";
-  error( RtMidiError::WARNING, errorString_ );
-}
-
-void MidiOutWinMM :: sendMessage( std::vector<unsigned char> *message )
-{
-  if ( !connected_ ) return;
-
-  unsigned int nBytes = static_cast<unsigned int>(message->size());
-  if ( nBytes == 0 ) {
-    errorString_ = "MidiOutWinMM::sendMessage: message argument is empty!";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  MMRESULT result;
-  WinMidiData *data = static_cast<WinMidiData *> (apiData_);
-  if ( message->at(0) == 0xF0 ) { // Sysex message
-
-    // Allocate buffer for sysex data.
-    char *buffer = (char *) malloc( nBytes );
-    if ( buffer == NULL ) {
-      errorString_ = "MidiOutWinMM::sendMessage: error allocating sysex message memory!";
-      error( RtMidiError::MEMORY_ERROR, errorString_ );
-      return;
-    }
-
-    // Copy data to buffer.
-    for ( unsigned int i=0; i<nBytes; ++i ) buffer[i] = message->at(i);
-
-    // Create and prepare MIDIHDR structure.
-    MIDIHDR sysex;
-    sysex.lpData = (LPSTR) buffer;
-    sysex.dwBufferLength = nBytes;
-    sysex.dwFlags = 0;
-    result = midiOutPrepareHeader( data->outHandle,  &sysex, sizeof(MIDIHDR) ); 
-    if ( result != MMSYSERR_NOERROR ) {
-      free( buffer );
-      errorString_ = "MidiOutWinMM::sendMessage: error preparing sysex header.";
-      error( RtMidiError::DRIVER_ERROR, errorString_ );
-      return;
-    }
-
-    // Send the message.
-    result = midiOutLongMsg( data->outHandle, &sysex, sizeof(MIDIHDR) );
-    if ( result != MMSYSERR_NOERROR ) {
-      free( buffer );
-      errorString_ = "MidiOutWinMM::sendMessage: error sending sysex message.";
-      error( RtMidiError::DRIVER_ERROR, errorString_ );
-      return;
-    }
-
-    // Unprepare the buffer and MIDIHDR.
-    while ( MIDIERR_STILLPLAYING == midiOutUnprepareHeader( data->outHandle, &sysex, sizeof (MIDIHDR) ) ) Sleep( 1 );
-    free( buffer );
-  }
-  else { // Channel or system message.
-
-    // Make sure the message size isn't too big.
-    if ( nBytes > 3 ) {
-      errorString_ = "MidiOutWinMM::sendMessage: message size is greater than 3 bytes (and not sysex)!";
-      error( RtMidiError::WARNING, errorString_ );
-      return;
-    }
-
-    // Pack MIDI bytes into double word.
-    DWORD packet;
-    unsigned char *ptr = (unsigned char *) &packet;
-    for ( unsigned int i=0; i<nBytes; ++i ) {
-      *ptr = message->at(i);
-      ++ptr;
-    }
-
-    // Send the message immediately.
-    result = midiOutShortMsg( data->outHandle, packet );
-    if ( result != MMSYSERR_NOERROR ) {
-      errorString_ = "MidiOutWinMM::sendMessage: error sending MIDI message.";
-      error( RtMidiError::DRIVER_ERROR, errorString_ );
-    }
-  }
-}
-
-#endif  // __WINDOWS_MM__
-
-
-//*********************************************************************//
-//  API: UNIX JACK
-//
-//  Written primarily by Alexander Svetalkin, with updates for delta
-//  time by Gary Scavone, April 2011.
-//
-//  *********************************************************************//
-
-#if defined(__UNIX_JACK__)
-
-// JACK header files
-#include <jack/jack.h>
-#include <jack/midiport.h>
-#include <jack/ringbuffer.h>
-
-#define JACK_RINGBUFFER_SIZE 16384 // Default size for ringbuffer
-
-struct JackMidiData {
-  jack_client_t *client;
-  jack_port_t *port;
-  jack_ringbuffer_t *buffSize;
-  jack_ringbuffer_t *buffMessage;
-  jack_time_t lastTime;
-  MidiInApi :: RtMidiInData *rtMidiIn;
-  };
-
-//*********************************************************************//
-//  API: JACK
-//  Class Definitions: MidiInJack
-//*********************************************************************//
-
-static int jackProcessIn( jack_nframes_t nframes, void *arg )
-{
-  JackMidiData *jData = (JackMidiData *) arg;
-  MidiInApi :: RtMidiInData *rtData = jData->rtMidiIn;
-  jack_midi_event_t event;
-  jack_time_t time;
-
-  // Is port created?
-  if ( jData->port == NULL ) return 0;
-  void *buff = jack_port_get_buffer( jData->port, nframes );
-
-  // We have midi events in buffer
-  int evCount = jack_midi_get_event_count( buff );
-  for (int j = 0; j < evCount; j++) {
-    MidiInApi::MidiMessage message;
-    message.bytes.clear();
-
-    jack_midi_event_get( &event, buff, j );
-
-    for ( unsigned int i = 0; i < event.size; i++ )
-      message.bytes.push_back( event.buffer[i] );
-
-    // Compute the delta time.
-    time = jack_get_time();
-    if ( rtData->firstMessage == true )
-      rtData->firstMessage = false;
-    else
-      message.timeStamp = ( time - jData->lastTime ) * 0.000001;
-
-    jData->lastTime = time;
-
-    if ( !rtData->continueSysex ) {
-      if ( rtData->usingCallback ) {
-        RtMidiIn::RtMidiCallback callback = (RtMidiIn::RtMidiCallback) rtData->userCallback;
-        callback( message.timeStamp, &message.bytes, rtData->userData );
-      }
-      else {
-        // As long as we haven't reached our queue size limit, push the message.
-        if ( rtData->queue.size < rtData->queue.ringSize ) {
-          rtData->queue.ring[rtData->queue.back++] = message;
-          if ( rtData->queue.back == rtData->queue.ringSize )
-            rtData->queue.back = 0;
-          rtData->queue.size++;
-        }
-        else
-          std::cerr << "\nMidiInJack: message queue limit reached!!\n\n";
-      }
-    }
-  }
-
-  return 0;
-}
-
-MidiInJack :: MidiInJack( const std::string clientName, unsigned int queueSizeLimit ) : MidiInApi( queueSizeLimit )
-{
-  initialize( clientName );
-}
-
-void MidiInJack :: initialize( const std::string& clientName )
-{
-  JackMidiData *data = new JackMidiData;
-  apiData_ = (void *) data;
-
-  data->rtMidiIn = &inputData_;
-  data->port = NULL;
-  data->client = NULL;
-  this->clientName = clientName;
-
-  connect();
-}
-
-void MidiInJack :: connect()
-{
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-  if ( data->client )
-    return;
-
-  // Initialize JACK client
-  if (( data->client = jack_client_open( clientName.c_str(), JackNoStartServer, NULL )) == 0) {
-    errorString_ = "MidiInJack::initialize: JACK server not running?";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  jack_set_process_callback( data->client, jackProcessIn, data );
-  jack_activate( data->client );
-}
-
-MidiInJack :: ~MidiInJack()
-{
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-  closePort();
-
-  if ( data->client )
-    jack_client_close( data->client );
-  delete data;
-}
-
-void MidiInJack :: openPort( unsigned int portNumber, const std::string portName )
-{
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-
-  connect();
-
-  // Creating new port
-  if ( data->port == NULL)
-    data->port = jack_port_register( data->client, portName.c_str(),
-                                     JACK_DEFAULT_MIDI_TYPE, JackPortIsInput, 0 );
-
-  if ( data->port == NULL) {
-    errorString_ = "MidiInJack::openPort: JACK error creating port";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Connecting to the output
-  std::string name = getPortName( portNumber );
-  jack_connect( data->client, name.c_str(), jack_port_name( data->port ) );
-}
-
-void MidiInJack :: openVirtualPort( const std::string portName )
-{
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-
-  connect();
-  if ( data->port == NULL )
-    data->port = jack_port_register( data->client, portName.c_str(),
-                                     JACK_DEFAULT_MIDI_TYPE, JackPortIsInput, 0 );
-
-  if ( data->port == NULL ) {
-    errorString_ = "MidiInJack::openVirtualPort: JACK error creating virtual port";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-  }
-}
-
-unsigned int MidiInJack :: getPortCount()
-{
-  int count = 0;
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-  connect();
-  if ( !data->client )
-    return 0;
-
-  // List of available ports
-  const char **ports = jack_get_ports( data->client, NULL, JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput );
-
-  if ( ports == NULL ) return 0;
-  while ( ports[count] != NULL )
-    count++;
-
-  free( ports );
-
-  return count;
-}
-
-std::string MidiInJack :: getPortName( unsigned int portNumber )
-{
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-  std::string retStr("");
-
-  connect();
-
-  // List of available ports
-  const char **ports = jack_get_ports( data->client, NULL,
-                                       JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput );
-
-  // Check port validity
-  if ( ports == NULL ) {
-    errorString_ = "MidiInJack::getPortName: no ports available!";
-    error( RtMidiError::WARNING, errorString_ );
-    return retStr;
-  }
-
-  if ( ports[portNumber] == NULL ) {
-    std::ostringstream ost;
-    ost << "MidiInJack::getPortName: the 'portNumber' argument (" << portNumber << ") is invalid.";
-    errorString_ = ost.str();
-    error( RtMidiError::WARNING, errorString_ );
-  }
-  else retStr.assign( ports[portNumber] );
-
-  free( ports );
-  return retStr;
-}
-
-void MidiInJack :: closePort()
-{
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-
-  if ( data->port == NULL ) return;
-  jack_port_unregister( data->client, data->port );
-  data->port = NULL;
-}
-
-//*********************************************************************//
-//  API: JACK
-//  Class Definitions: MidiOutJack
-//*********************************************************************//
-
-// Jack process callback
-static int jackProcessOut( jack_nframes_t nframes, void *arg )
-{
-  JackMidiData *data = (JackMidiData *) arg;
-  jack_midi_data_t *midiData;
-  int space;
-
-  // Is port created?
-  if ( data->port == NULL ) return 0;
-
-  void *buff = jack_port_get_buffer( data->port, nframes );
-  jack_midi_clear_buffer( buff );
-
-  while ( jack_ringbuffer_read_space( data->buffSize ) > 0 ) {
-    jack_ringbuffer_read( data->buffSize, (char *) &space, (size_t) sizeof(space) );
-    midiData = jack_midi_event_reserve( buff, 0, space );
-
-    jack_ringbuffer_read( data->buffMessage, (char *) midiData, (size_t) space );
-  }
-
-  return 0;
-}
-
-MidiOutJack :: MidiOutJack( const std::string clientName ) : MidiOutApi()
-{
-  initialize( clientName );
-}
-
-void MidiOutJack :: initialize( const std::string& clientName )
-{
-  JackMidiData *data = new JackMidiData;
-  apiData_ = (void *) data;
-
-  data->port = NULL;
-  data->client = NULL;
-  this->clientName = clientName;
-
-  connect();
-}
-
-void MidiOutJack :: connect()
-{
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-  if ( data->client )
-    return;
-
-  // Initialize JACK client
-  if (( data->client = jack_client_open( clientName.c_str(), JackNoStartServer, NULL )) == 0) {
-    errorString_ = "MidiOutJack::initialize: JACK server not running?";
-    error( RtMidiError::WARNING, errorString_ );
-    return;
-  }
-
-  jack_set_process_callback( data->client, jackProcessOut, data );
-  data->buffSize = jack_ringbuffer_create( JACK_RINGBUFFER_SIZE );
-  data->buffMessage = jack_ringbuffer_create( JACK_RINGBUFFER_SIZE );
-  jack_activate( data->client );
-}
-
-MidiOutJack :: ~MidiOutJack()
-{
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-  closePort();
-
-  if ( data->client ) {
-    // Cleanup
-    jack_client_close( data->client );
-    jack_ringbuffer_free( data->buffSize );
-    jack_ringbuffer_free( data->buffMessage );
-  }
-
-  delete data;
-}
-
-void MidiOutJack :: openPort( unsigned int portNumber, const std::string portName )
-{
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-
-  connect();
-
-  // Creating new port
-  if ( data->port == NULL )
-    data->port = jack_port_register( data->client, portName.c_str(),
-      JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput, 0 );
-
-  if ( data->port == NULL ) {
-    errorString_ = "MidiOutJack::openPort: JACK error creating port";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-    return;
-  }
-
-  // Connecting to the output
-  std::string name = getPortName( portNumber );
-  jack_connect( data->client, jack_port_name( data->port ), name.c_str() );
-}
-
-void MidiOutJack :: openVirtualPort( const std::string portName )
-{
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-
-  connect();
-  if ( data->port == NULL )
-    data->port = jack_port_register( data->client, portName.c_str(),
-      JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput, 0 );
-
-  if ( data->port == NULL ) {
-    errorString_ = "MidiOutJack::openVirtualPort: JACK error creating virtual port";
-    error( RtMidiError::DRIVER_ERROR, errorString_ );
-  }
-}
-
-unsigned int MidiOutJack :: getPortCount()
-{
-  int count = 0;
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-  connect();
-  if ( !data->client )
-    return 0;
-
-  // List of available ports
-  const char **ports = jack_get_ports( data->client, NULL,
-    JACK_DEFAULT_MIDI_TYPE, JackPortIsInput );
-
-  if ( ports == NULL ) return 0;
-  while ( ports[count] != NULL )
-    count++;
-
-  free( ports );
-
-  return count;
-}
-
-std::string MidiOutJack :: getPortName( unsigned int portNumber )
-{
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-  std::string retStr("");
-
-  connect();
-
-  // List of available ports
-  const char **ports = jack_get_ports( data->client, NULL,
-    JACK_DEFAULT_MIDI_TYPE, JackPortIsInput );
-
-  // Check port validity
-  if ( ports == NULL) {
-    errorString_ = "MidiOutJack::getPortName: no ports available!";
-    error( RtMidiError::WARNING, errorString_ );
-    return retStr;
-  }
-
-  if ( ports[portNumber] == NULL) {
-    std::ostringstream ost;
-    ost << "MidiOutJack::getPortName: the 'portNumber' argument (" << portNumber << ") is invalid.";
-    errorString_ = ost.str();
-    error( RtMidiError::WARNING, errorString_ );
-  }
-  else retStr.assign( ports[portNumber] );
-
-  free( ports );
-  return retStr;
-}
-
-void MidiOutJack :: closePort()
-{
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-
-  if ( data->port == NULL ) return;
-  jack_port_unregister( data->client, data->port );
-  data->port = NULL;
-}
-
-void MidiOutJack :: sendMessage( std::vector<unsigned char> *message )
-{
-  int nBytes = message->size();
-  JackMidiData *data = static_cast<JackMidiData *> (apiData_);
-
-  // Write full message to buffer
-  jack_ringbuffer_write( data->buffMessage, ( const char * ) &( *message )[0],
-                         message->size() );
-  jack_ringbuffer_write( data->buffSize, ( char * ) &nBytes, sizeof( nBytes ) );
-}
-
-#endif  // __UNIX_JACK__

+ 0 - 153
configure.ac

@@ -1,153 +0,0 @@
-# Process this file with autoconf to produce a configure script.
-AC_INIT(RtMidi, 2.1.0, gary@music.mcgill.ca, rtmidi)
-AC_CONFIG_AUX_DIR(config)
-AC_CONFIG_SRCDIR(RtMidi.cpp)
-AC_CONFIG_FILES([rtmidi-config librtmidi.pc Makefile tests/Makefile])
-AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
-
-# Fill GXX with something before test.
-AC_SUBST( GXX, ["no"] )
-AC_SUBST(noinst_LIBRARIES)
-
-# Checks for programs.
-AC_PROG_CXX(g++ CC c++ cxx)
-AM_PROG_AR
-AC_PATH_PROG(AR, ar, no)
-if [[ $AR = "no" ]] ; then
-    AC_MSG_ERROR("Could not find ar - needed to create a library");
-fi
-
-LT_INIT([win32-dll])
-AC_CONFIG_MACRO_DIR([m4])
-
-# Checks for header files.
-AC_HEADER_STDC
-#AC_CHECK_HEADERS(sys/ioctl.h unistd.h)
-
-# Check for debug
-AC_MSG_CHECKING(whether to compile debug version)
-AC_ARG_ENABLE(debug,
-  [  --enable-debug = enable various debug output],
-  [AC_SUBST( cppflag, [-D__RTMIDI_DEBUG__] ) AC_SUBST( cxxflag, [-g] ) AC_SUBST( object_path, [Debug] ) AC_MSG_RESULT(yes)],
-  [AC_SUBST( cppflag, [] ) AC_SUBST( cxxflag, [-O3] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)])
-
-# Set paths if prefix is defined
-if test "x$prefix" != "x" && test "x$prefix" != "xNONE"; then
-  LIBS="$LIBS -L$prefix/lib"
-  CPPFLAGS="$CPPFLAGS -I$prefix/include"
-fi
-
-# For -I and -D flags
-CPPFLAGS="$CPPFLAGS $cppflag"
-
-# For debugging and optimization ... overwrite default because it has both -g and -O2
-#CXXFLAGS="$CXXFLAGS $cxxflag"
-CXXFLAGS="$cxxflag"
-
-# Check compiler and use -Wall if gnu.
-if [test $GXX = "yes" ;] then
-  AC_SUBST( cxxflag, ["-Wall -Wextra"] )
-fi
-
-CXXFLAGS="$CXXFLAGS $cxxflag"
-
-# Checks for package options and external software
-AC_CANONICAL_HOST
-
-AC_SUBST( sharedlib, ["librtmidi.so"] )
-AC_SUBST( sharedname, ["librtmidi.so.\$(RELEASE)"] )
-AC_SUBST( libflags, ["-shared -Wl,-soname,\$(SHARED).\$(MAJOR) -o \$(SHARED).\$(RELEASE)"] )
-case $host in
-  *-apple*)
-  AC_SUBST( sharedlib, ["librtmidi.dylib"] )
-  AC_SUBST( sharedname, ["librtmidi.\$(RELEASE).dylib"] )
-  AC_SUBST( libflags, ["-dynamiclib -o librtmidi.\$(RELEASE).dylib"] )
-esac
-
-AC_SUBST( api, [""] )
-AC_SUBST( req, [""] )
-AC_MSG_CHECKING(for MIDI API)
-case $host in
-  *-*-linux*)
-  AC_ARG_WITH(jack, [  --with-jack = choose JACK server support (mac and linux only)], [
-  api="$api -D__UNIX_JACK__"
-  AC_MSG_RESULT(using JACK)
-  AC_CHECK_LIB(jack, jack_client_open, , AC_MSG_ERROR(JACK support requires the jack library!))], )
-
-  # Look for ALSA flag
-  AC_ARG_WITH(alsa, [  --with-alsa = choose native ALSA sequencer API support (linux only)], [
-    api="$api -D__LINUX_ALSA__"
-    req="$req alsa"
-    AC_MSG_RESULT(using ALSA)
-    AC_CHECK_LIB(asound, snd_seq_open, , AC_MSG_ERROR(ALSA support requires the asound library!))], )
-
-  if [test "$api" == "";] then
-    AC_MSG_RESULT(using ALSA)
-    AC_SUBST( api, [-D__LINUX_ALSA__] )
-    req="$req alsa"
-    AC_CHECK_LIB(asound, snd_seq_open, , AC_MSG_ERROR(ALSA sequencer support requires the asound library!))
-  fi
-
-  # Checks for pthread library.
-  AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtMidi requires the pthread library!))
-  ;;
-
-  *-apple*)
-  AC_ARG_WITH(jack, [  --with-jack = choose JACK server support (mac and linux only)], [
-  api="$api -D__UNIX_JACK__"
-  AC_MSG_RESULT(using JACK)
-  AC_CHECK_LIB(jack, jack_client_open, , AC_MSG_ERROR(JACK support requires the jack library!))], )
-
-  # Look for Core flag
-  AC_ARG_WITH(core, [  --with-core = choose CoreMidi API support (mac only)], [
-    api="$api -D__MACOSX_CORE__"
-    AC_MSG_RESULT(using CoreMidi)
-    AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h, [], [AC_MSG_ERROR(CoreMIDI header files not found!)] )
-    LIBS="$LIBS -framework CoreMIDI -framework CoreFoundation -framework CoreAudio" ], )
-
-  # If no api flags specified, use CoreMidi
-  if [test "$api" == ""; ] then
-    AC_SUBST( api, [-D__MACOSX_CORE__] )
-    AC_MSG_RESULT(using CoreMidi)
-    AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h,
-      [],
-      [AC_MSG_ERROR(CoreMIDI header files not found!)] )
-    AC_SUBST( LIBS, ["-framework CoreMIDI -framework CoreFoundation -framework CoreAudio"] )
-  fi
-  ;;
-
-  *-mingw32*)
-  # Look for WinMM flag
-  AC_ARG_WITH(winmm, [  --with-winmm = choose Windows MultiMedia (MM) API support (windoze only)], [
-    api="$api -D__WINDOWS_MM__"
-    AC_MSG_RESULT(using WinMM)
-    AC_SUBST( LIBS, [-lwinmm] )], )
-
-  AC_ARG_WITH(winks, [  --with-winks = choose kernel streaming support (windoze only)], [
-    api="$api -D__WINDOWS_KS__"
-    AC_SUBST( LIBS, ["-lsetupapi -lksuser"] )
-    AC_MSG_RESULT(using kernel streaming) ], )
-
-  # I can't get the following check to work so just manually add the library
-	# or could try the following?  AC_LIB_WINMM([midiOutGetNumDevs])
-  # AC_CHECK_LIB(winmm, midiInGetNumDevs, , AC_MSG_ERROR(Windows MIDI support requires the winmm library!) )],)
-
-  # If no api flags specified, use WinMM
-  if [test "$api" == "";] then
-    AC_SUBST( api, [-D__WINDOWS_MM__] )
-    AC_MSG_RESULT(using WinMM)
-    AC_SUBST( LIBS, [-lwinmm] )
-  fi
-  ;;
-
-  *)
-  # Default case for unknown realtime systems.
-  AC_MSG_ERROR(Unknown system type for MIDI support!)
-  ;;
-esac
-
-CPPFLAGS="$CPPFLAGS $api"
-
-AC_OUTPUT
-
-chmod oug+x rtmidi-config

+ 0 - 1865
doc/doxygen/Doxyfile

@@ -1,1865 +0,0 @@
-# Doxyfile 1.8.3.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file 
-# that follow. The default is UTF-8 which is also the encoding used for all 
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
-# iconv built into libc) for the transcoding. See 
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or sequence of words) that should 
-# identify the project. Note that if you do not use Doxywizard you need 
-# to put quotes around the project name if it contains spaces.
-
-PROJECT_NAME           = RtMidi
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
-
-PROJECT_NUMBER         = 2.1.0
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description 
-# for a project that appears at the top of each page and should give viewer 
-# a quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF          = 
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is 
-# included in the documentation. The maximum height of the logo should not 
-# exceed 55 pixels and the maximum width should not exceed 200 pixels. 
-# Doxygen will copy the logo to the output directory.
-
-PROJECT_LOGO           = 
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = .
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, 
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       = 
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip. Note that you specify absolute paths here, but also 
-# relative paths, which will be relative from the directory where doxygen is 
-# started.
-
-STRIP_FROM_PATH        = 
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    = 
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful if your file system 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like regular Qt-style comments 
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF      = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
-# interpret the first line (until the first dot) of a Qt-style 
-# comment as the brief description. If set to NO, the comments 
-# will behave just like regular Qt-style comments (thus requiring 
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                = 
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only). 
-# A mapping has the form "name=value". For example adding 
-# "class=itcl::class" will allow you to use the command class in the 
-# itcl::class meaning.
-
-TCL_SUBST              = 
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for 
-# Java. For instance, namespaces will be presented as packages, qualified 
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
-# sources only. Doxygen will then generate output that is more tailored for 
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
-# sources. Doxygen will then generate output that is tailored for 
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it 
-# parses. With this tag you can assign which parser to use for a given 
-# extension. Doxygen has a built-in mapping, but you can override or extend it 
-# using this tag. The format is ext=language, where ext is a file extension, 
-# and language is one of the parsers supported by doxygen: IDL, Java, 
-# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, 
-# C++. For instance to make doxygen treat .inc files as Fortran files (default 
-# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note 
-# that for custom extensions you also need to set FILE_PATTERNS otherwise the 
-# files are not read by doxygen.
-
-EXTENSION_MAPPING      = 
-
-# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all 
-# comments according to the Markdown format, which allows for more readable 
-# documentation. See http://daringfireball.net/projects/markdown/ for details. 
-# The output of markdown processing is further processed by doxygen, so you 
-# can mix doxygen, HTML, and XML commands with Markdown formatting. 
-# Disable only in case of backward compatibilities issues.
-
-MARKDOWN_SUPPORT       = YES
-
-# When enabled doxygen tries to link words that correspond to documented classes, 
-# or namespaces to their corresponding documentation. Such a link can be 
-# prevented in individual cases by by putting a % sign in front of the word or 
-# globally by setting AUTOLINK_SUPPORT to NO.
-
-AUTOLINK_SUPPORT       = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
-# to include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also makes the inheritance and collaboration 
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to 
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
-# Doxygen will parse them like normal C++ but will assume all classes use public 
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT            = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate 
-# getter and setter methods for a property. Setting this option to YES (the 
-# default) will make doxygen replace the get and set methods by a property in 
-# the documentation. This will only work if the methods are indeed getting or 
-# setting a simple type. If this is not the case, or you want to show the 
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT   = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and 
-# unions are shown inside the group in which they are included (e.g. using 
-# @ingroup) instead of on a separate page (for HTML and Man pages) or 
-# section (for LaTeX and RTF).
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and 
-# unions with only public data fields will be shown inline in the documentation 
-# of the scope in which they are defined (i.e. file, namespace, or group 
-# documentation), provided this scope is documented. If set to NO (the default), 
-# structs, classes, and unions are shown on a separate page (for HTML and Man 
-# pages) or section (for LaTeX and RTF).
-
-INLINE_SIMPLE_STRUCTS  = NO
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
-# is documented as struct, union, or enum with the name of the typedef. So 
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
-# with name TypeT. When disabled the typedef will appear as a member of a file, 
-# namespace, or class. And the struct will be named TypeS. This can typically 
-# be useful for C code in case the coding convention dictates that all compound 
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
-# determine which symbols to keep in memory and which to flush to disk. 
-# When the cache is full, less often used symbols will be written to disk. 
-# For small to medium size projects (<1000 input files) the default value is 
-# probably good enough. For larger projects a too small cache size can cause 
-# doxygen to be busy swapping symbols to and from disk most of the time 
-# causing a significant performance penalty. 
-# If the system has enough physical memory increasing the cache will improve the 
-# performance by keeping more symbols in memory. Note that the value works on 
-# a logarithmic scale so increasing the size by one will roughly double the 
-# memory usage. The cache size is given by this formula: 
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-SYMBOL_CACHE_SIZE      = 0
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be 
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given 
-# their name and scope. Since this can be an expensive process and often the 
-# same symbol appear multiple times in the code, doxygen keeps a cache of 
-# pre-resolved symbols. If the cache is too small doxygen will become slower. 
-# If the cache is too large, memory is wasted. The cache size is given by this 
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, 
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-LOOKUP_CACHE_SIZE      = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal 
-# scope will be included in the documentation.
-
-EXTRACT_PACKAGE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be 
-# extracted and appear in the documentation as a namespace called 
-# 'anonymous_namespace{file}', where file will be replaced with the base 
-# name of the file that contains the anonymous namespace. By default 
-# anonymous namespaces are hidden.
-
-EXTRACT_ANON_NSPACES   = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 
-# will list include files with double quotes in the documentation 
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES   = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
-
-SORT_MEMBER_DOCS       = NO
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 
-# will sort the (brief and detailed) documentation of class members so that 
-# constructors and destructors are listed first. If set to NO (the default) 
-# the constructors will appear in the respective orders defined by 
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
-# hierarchy of group names into alphabetical order. If set to NO (the default) 
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES       = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to 
-# do proper type resolution of all parameters of a function it will reject a 
-# match between the prototype and the implementation of a member function even 
-# if there is only one candidate or it is obvious which candidate to choose 
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen 
-# will still accept a match between prototype and implementation in such cases.
-
-STRICT_PROTO_MATCHING  = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if section-label ... \endif 
-# and \cond section-label ... \endcond blocks.
-
-ENABLED_SECTIONS       = 
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or macro consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and macros in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
-# This will remove the Files entry from the Quick Index and from the 
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES             = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
-# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES        = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from 
-# the version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    = 
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 
-# by doxygen. The layout file controls the global structure of the generated 
-# output files in an output format independent way. To create the layout file 
-# that represents doxygen's defaults, run doxygen with the -l option. 
-# You can optionally specify a file name after the option, if omitted 
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE            = 
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files 
-# containing the references data. This must be a list of .bib files. The 
-# .bib extension is automatically appended if omitted. Using this command 
-# requires the bibtex tool to be installed. See also 
-# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style 
-# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this 
-# feature you need bibtex and perl available in the search path. Do not use 
-# file names with spaces, bibtex cannot handle them.
-
-CITE_BIB_FILES         = 
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
-
-WARN_LOGFILE           = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
-
-INPUT                  = tutorial.txt \
-                         ../../RtMidi.h \
-                         ../../RtError.h
-
-# This tag can be used to specify the character encoding of the source files 
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
-# also the default input encoding. Doxygen uses libiconv (or the iconv built 
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
-# the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh 
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py 
-# *.f90 *.f *.for *.vhd *.vhdl
-
-FILE_PATTERNS          = 
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be 
-# excluded from the INPUT source files. This way you can easily exclude a 
-# subdirectory from a directory tree whose root is specified with the INPUT tag. 
-# Note that relative paths are relative to the directory from which doxygen is 
-# run.
-
-EXCLUDE                = 
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or 
-# directories that are symbolic links (a Unix file system feature) are excluded 
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       = 
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the 
-# output. The symbol name can be a fully qualified name, a word, or if the 
-# wildcard * is used, a substring. Examples: ANamespace, AClass, 
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        = 
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
-
-EXAMPLE_PATH           = 
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
-
-EXAMPLE_PATTERNS       = 
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
-
-IMAGE_PATH             = 
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
-# ignored.
-
-INPUT_FILTER           = 
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty or if 
-# non of the patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS        = 
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any) 
-# and it is also possible to disable source filtering for a specific pattern 
-# using *.ext= (so without naming a filter). This option only has effect when 
-# FILTER_SOURCE_FILES is enabled.
-
-FILTER_SOURCE_PATTERNS = 
-
-# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that 
-# is part of the input, its contents will be placed on the main page (index.html). 
-# This can be useful if you have a project on for instance GitHub and want reuse 
-# the introduction page also for the doxygen output.
-
-USE_MDFILE_AS_MAINPAGE = 
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C, C++ and Fortran comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES 
-# then for each documented function all documented 
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
-# link to the source code.  Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = ../html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard header. Note that when using a custom header you are responsible  
-# for the proper inclusion of any scripts and style sheets that doxygen 
-# needs, which is dependent on the configuration options used. 
-# It is advised to generate a default header using "doxygen -w html 
-# header.html footer.html stylesheet.css YourConfigFile" and then modify 
-# that header. Note that the header is subject to change so you typically 
-# have to redo this when upgrading to a newer version of doxygen or when 
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
-
-HTML_HEADER            = header.html
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
-
-HTML_FOOTER            = footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If left blank doxygen will 
-# generate a default style sheet. Note that it is recommended to use 
-# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this 
-# tag will in the future become obsolete.
-
-HTML_STYLESHEET        = 
-
-# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional 
-# user-defined cascading style sheet that is included after the standard 
-# style sheets created by doxygen. Using this option one can overrule 
-# certain style aspects. This is preferred over using HTML_STYLESHEET 
-# since it does not replace the standard style sheet and is therefor more 
-# robust against future updates. Doxygen will copy the style sheet file to 
-# the output directory.
-
-HTML_EXTRA_STYLESHEET  = 
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 
-# other source files which should be copied to the HTML output directory. Note 
-# that these files will be copied to the base HTML output directory. Use the 
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that 
-# the files will be copied as-is; there are no commands or markers available.
-
-HTML_EXTRA_FILES       = 
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 
-# Doxygen will adjust the colors in the style sheet and background images 
-# according to this color. Hue is specified as an angle on a colorwheel, 
-# see http://en.wikipedia.org/wiki/Hue for more information. 
-# For instance the value 0 represents red, 60 is yellow, 120 is green, 
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE    = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 
-# the colors in the HTML output. For a value of 0 the output will use 
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT    = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 
-# the luminance component of the colors in the HTML output. Values below 
-# 100 gradually make the output lighter, whereas values above 100 make 
-# the output darker. The value divided by 100 is the actual gamma applied, 
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA  = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 
-# page will contain the date and time when the page was generated. Setting 
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP         = NO
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
-# documentation will contain sections that can be hidden and shown after the 
-# page has loaded.
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of 
-# entries shown in the various tree structured indices initially; the user 
-# can expand and collapse entries dynamically later on. Doxygen will expand 
-# the tree to such a level that at most the specified number of entries are 
-# visible (unless a fully collapsed tree already exceeds this amount). 
-# So setting the number of entries 1 will produce a full collapsed tree by 
-# default. 0 is a special value representing an infinite number of entries 
-# and will result in a full expanded tree by default.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files 
-# will be generated that can be used as input for Apple's Xcode 3 
-# integrated development environment, introduced with OSX 10.5 (Leopard). 
-# To create a documentation set, doxygen will generate a Makefile in the 
-# HTML output directory. Running make will produce the docset in that 
-# directory and running "make install" will install the docset in 
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
-# it at startup. 
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 
-# for more information.
-
-GENERATE_DOCSET        = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
-# feed. A documentation feed provides an umbrella under which multiple 
-# documentation sets from a single provider (such as a company or product suite) 
-# can be grouped.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
-# should uniquely identify the documentation set bundle. This should be a 
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely 
-# identify the documentation publisher. This should be a reverse domain-name 
-# style string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME  = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
-# written to the html output directory.
-
-CHM_FILE               = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
-# content.
-
-CHM_INDEX_ENCODING     = 
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 
-# that can be used as input for Qt's qhelpgenerator to generate a 
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP           = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
-# be used to specify the file name of the resulting .qch file. 
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE               = 
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating 
-# Qt Help Project output. For more information please see 
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE          = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
-# Qt Help Project output. For more information please see 
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER     = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 
-# add. For more information please see 
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME   = 
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 
-# custom filter to add. For more information please see 
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> 
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS  = 
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 
-# project's 
-# filter section matches. 
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> 
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS  = 
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
-# be used to specify the location of Qt's qhelpgenerator. 
-# If non-empty doxygen will try to run qhelpgenerator on the generated 
-# .qhp file.
-
-QHG_LOCATION           = 
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files  
-# will be generated, which together with the HTML files, form an Eclipse help 
-# plugin. To install this plugin and make it available under the help contents 
-# menu in Eclipse, the contents of the directory containing the HTML and XML 
-# files needs to be copied into the plugins directory of eclipse. The name of 
-# the directory within the plugins directory should be the same as 
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 
-# the help appears.
-
-GENERATE_ECLIPSEHELP   = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin 
-# the directory name containing the HTML and XML files should also have 
-# this name.
-
-ECLIPSE_DOC_ID         = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) 
-# at top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it. Since the tabs have the same information as the 
-# navigation tree you can set this option to NO if you already set 
-# GENERATE_TREEVIEW to YES.
-
-DISABLE_INDEX          = YES
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
-# structure should be generated to display hierarchical information. 
-# If the tag value is set to YES, a side panel will be generated 
-# containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
-# Windows users are probably better off using the HTML help feature. 
-# Since the tree basically has the same information as the tab index you 
-# could consider to set DISABLE_INDEX to NO when enabling this option.
-
-GENERATE_TREEVIEW      = NO
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML 
-# documentation. Note that a value of 0 will completely suppress the enum 
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW    = NO
-
-# Use this tag to change the font size of Latex formulas included 
-# as images in the HTML documentation. The default is 10. Note that 
-# when you change the font size after a successful doxygen run you need 
-# to manually remove any form_*.png images from the HTML output directory 
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE       = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images 
-# generated for formulas are transparent PNGs. Transparent PNGs are 
-# not supported properly for IE 6.0, but are supported on all modern browsers. 
-# Note that when changing this option you need to delete any form_*.png files 
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT    = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax 
-# (see http://www.mathjax.org) which uses client side Javascript for the 
-# rendering instead of using prerendered bitmaps. Use this if you do not 
-# have LaTeX installed or if you want to formulas look prettier in the HTML 
-# output. When enabled you may also need to install MathJax separately and 
-# configure the path to it using the MATHJAX_RELPATH option.
-
-USE_MATHJAX            = NO
-
-# When MathJax is enabled you can set the default output format to be used for 
-# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and 
-# SVG. The default value is HTML-CSS, which is slower, but has the best 
-# compatibility.
-
-MATHJAX_FORMAT         = HTML-CSS
-
-# When MathJax is enabled you need to specify the location relative to the 
-# HTML output directory using the MATHJAX_RELPATH option. The destination 
-# directory should contain the MathJax.js script. For instance, if the mathjax 
-# directory is located at the same level as the HTML output directory, then 
-# MATHJAX_RELPATH should be ../mathjax. The default value points to 
-# the MathJax Content Delivery Network so you can quickly see the result without 
-# installing MathJax.  However, it is strongly recommended to install a local 
-# copy of MathJax from http://www.mathjax.org before deployment.
-
-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension 
-# names that should be enabled during MathJax rendering.
-
-MATHJAX_EXTENSIONS     = 
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box 
-# for the HTML output. The underlying search engine uses javascript 
-# and DHTML and should work on any modern browser. Note that when using 
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 
-# (GENERATE_DOCSET) there is already a search function so this one should 
-# typically be disabled. For large projects the javascript based search engine 
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE           = NO
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be 
-# implemented using a web server instead of a web client using Javascript. 
-# There are two flavours of web server based search depending on the 
-# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for 
-# searching and an index file used by the script. When EXTERNAL_SEARCH is 
-# enabled the indexing and searching needs to be provided by external tools. 
-# See the manual for details.
-
-SERVER_BASED_SEARCH    = NO
-
-# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP 
-# script for searching. Instead the search results are written to an XML file 
-# which needs to be processed by an external indexer. Doxygen will invoke an 
-# external search engine pointed to by the SEARCHENGINE_URL option to obtain 
-# the search results. Doxygen ships with an example indexer (doxyindexer) and 
-# search engine (doxysearch.cgi) which are based on the open source search engine 
-# library Xapian. See the manual for configuration details.
-
-EXTERNAL_SEARCH        = NO
-
-# The SEARCHENGINE_URL should point to a search engine hosted by a web server 
-# which will returned the search results when EXTERNAL_SEARCH is enabled. 
-# Doxygen ships with an example search engine (doxysearch) which is based on 
-# the open source search engine library Xapian. See the manual for configuration 
-# details.
-
-SEARCHENGINE_URL       = 
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed 
-# search data is written to a file for indexing by an external tool. With the 
-# SEARCHDATA_FILE tag the name of this file can be specified.
-
-SEARCHDATA_FILE        = searchdata.xml
-
-# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the 
-# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is 
-# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple 
-# projects and redirect the results back to the right project.
-
-EXTERNAL_SEARCH_ID     = 
-
-# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen 
-# projects other than the one defined by this configuration file, but that are 
-# all added to the same external search index. Each project needs to have a 
-# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id 
-# of to a relative location where the documentation can be found. 
-# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ...
-
-EXTRA_SEARCH_MAPPINGS  = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
-
-GENERATE_LATEX         = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name. 
-# Note that when enabling USE_PDFLATEX this option is only used for 
-# generating bitmaps for formulas in the HTML output, but not in the 
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, letter, legal and 
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = letter
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         = 
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           = 
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for 
-# the generated latex document. The footer should contain everything after 
-# the last chapter. If it is left blank doxygen will generate a 
-# standard footer. Notice: only use this tag if you know what you are doing!
-
-LATEX_FOOTER           = 
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include 
-# source code with syntax highlighting in the LaTeX output. 
-# Note that which sources are shown also depends on other settings 
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE      = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the 
-# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See 
-# http://en.wikipedia.org/wiki/BibTeX for more info.
-
-LATEX_BIB_STYLE        = plain
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load style sheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    = 
-
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    = 
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX = 
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# pointed to by INCLUDE_PATH will be searched when a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
-
-INCLUDE_PATH           = 
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
-
-INCLUDE_FILE_PATTERNS  = 
-
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
-# instead of the = operator.
-
-PREDEFINED             = __MACOSX_CORE__ \
-                         __WINDOWS_MM__ \
-                         __UNIX_JACK__ \
-                         __LINUX_ALSA__ \
-                         __WINDOWS_KS__
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition that 
-# overrules the definition found in the source code.
-
-EXPAND_AS_DEFINED      = 
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all references to function-like macros 
-# that are alone on a line, have an all uppercase name, and do not end with a 
-# semicolon, because these will confuse the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles. For each 
-# tag file the location of the external documentation should be added. The 
-# format of a tag file without this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths 
-# or URLs. Note that each tag file must have a unique name (where the name does 
-# NOT include the path). If a tag file is not located in the directory in which 
-# doxygen is run, you must also specify the path to the tagfile here.
-
-TAGFILES               = 
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       = 
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option also works with HAVE_DOT disabled, but it is recommended to 
-# install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see 
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
-# the mscgen tool resides. If left empty the tool is assumed to be found in the 
-# default search path.
-
-MSCGEN_PATH            = /Applications/Doxygen.app/Contents/Resources/
-
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 
-# allowed to run in parallel. When set to 0 (the default) doxygen will 
-# base this on the number of processors available in the system. You can set it 
-# explicitly to a value larger than 0 to get control over the balance 
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS        = 0
-
-# By default doxygen will use the Helvetica font for all dot files that 
-# doxygen generates. When you want a differently looking font you can specify 
-# the font name using DOT_FONTNAME. You need to make sure dot is able to find 
-# the font, which can be done by putting it in a standard location or by setting 
-# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the 
-# directory containing the font.
-
-DOT_FONTNAME           = FreeSans
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
-# The default size is 10pt.
-
-DOT_FONTSIZE           = 10
-
-# By default doxygen will tell dot to use the Helvetica font. 
-# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to 
-# set the path where dot can find it.
-
-DOT_FONTPATH           = 
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
-# Language.
-
-UML_LOOK               = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside 
-# the class node. If there are many fields or methods and many nodes the 
-# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS 
-# threshold limits the number of items for each type to make the size more 
-# managable. Set this to 0 for no limit. Note that the threshold may be 
-# exceeded by 50% before the limit is enforced.
-
-UML_LIMIT_NUM_FIELDS   = 10
-
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
-# doxygen will generate a call dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable call graphs 
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
-# doxygen will generate a caller dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable caller 
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include 
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are svg, png, jpg, or gif. 
-# If left blank png will be used. If you choose svg you need to set 
-# HTML_FILE_EXTENSION to xhtml in order to make the SVG files 
-# visible in IE 9+ (other browsers do not have this requirement).
-
-DOT_IMAGE_FORMAT       = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to 
-# enable generation of interactive SVG images that allow zooming and panning. 
-# Note that this requires a modern browser other than Internet Explorer. 
-# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you 
-# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files 
-# visible. Older versions of IE do not have SVG support.
-
-INTERACTIVE_SVG        = NO
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               = /Applications/Doxygen.app/Contents/Resources/
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
-
-DOTFILE_DIRS           = 
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that 
-# contain msc files that are included in the documentation (see the 
-# \mscfile command).
-
-MSCFILE_DIRS           = 
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen if the 
-# number of direct children of the root node in a graph is already larger than 
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes 
-# that lay further from the root node will be omitted. Note that setting this 
-# option to 1 or 2 may greatly reduce the computation time needed for large 
-# code bases. Also note that the size of a graph can be further restricted by 
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is disabled by default, because dot on Windows does not 
-# seem to support this out of the box. Warning: Depending on the platform used, 
-# enabling this option may lead to badly anti-aliased labels on the edges of 
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT        = YES
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
-
-DOT_CLEANUP            = YES

+ 0 - 9
doc/doxygen/footer.html

@@ -1,9 +0,0 @@
-<HR>
-
-<table><tr><td><img src="../images/mcgill.gif" width=165></td>
-  <td>&copy;2003-2014 Gary P. Scavone, McGill University. All Rights Reserved.<br>
-  Maintained by Gary P. Scavone, gary at music.mcgill.ca</td></tr>
-</table>
-
-</BODY>
-</HTML>

+ 0 - 9
doc/doxygen/header.html

@@ -1,9 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>The RtMidi Tutorial</TITLE>
-<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
-</HEAD>
-<BODY BGCOLOR="#FFFFFF">
-<CENTER>
-<a class="qindex" href="index.html">Tutorial</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
-<HR>

+ 0 - 469
doc/doxygen/tutorial.txt

@@ -1,469 +0,0 @@
-/*! \mainpage The RtMidi Tutorial
-
-<CENTER>\ref intro &nbsp;&nbsp; \ref download &nbsp;&nbsp; \ref start &nbsp;&nbsp; \ref error &nbsp;&nbsp; \ref probing &nbsp;&nbsp; \ref output &nbsp;&nbsp; \ref input &nbsp;&nbsp; \ref virtual &nbsp;&nbsp; \ref compiling &nbsp;&nbsp; \ref debug &nbsp;&nbsp; \ref multi &nbsp;&nbsp; \ref apinotes &nbsp;&nbsp; \ref acknowledge &nbsp;&nbsp; \ref license</CENTER>
-
-\section intro Introduction
-
-RtMidi is a set of C++ classes (RtMidiIn, RtMidiOut and API-specific classes) that provides a common API (Application Programming Interface) for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMIDI & JACK), and Windows (Multimedia Library) operating systems.  RtMidi significantly simplifies the process of interacting with computer MIDI hardware and software.  It was designed with the following goals:
-
-<UL>
-  <LI>object oriented C++ design</LI>
-  <LI>simple, common API across all supported platforms</LI>
-  <LI>only one header and one source file for easy inclusion in programming projects</LI>
-  <LI>MIDI device enumeration</LI>
-</UL>
-
-Where applicable, multiple API support can be compiled and a particular API specified when creating an RtAudio instance.
-
-MIDI input and output functionality are separated into two classes, RtMidiIn and RtMidiOut.  Each class instance supports only a single MIDI connection.  RtMidi does not provide timing functionality (i.e., output messages are sent immediately).  Input messages are timestamped with delta times in seconds (via a \c double floating point type).  MIDI data is passed to the user as raw bytes using an std::vector<unsigned char>.
-
-\section whatsnew What's New (Version 2.1)
-
-A minor API change was made. The RtError class was renamed RtMidiError and embedded directly in RtMidi.h.  Thus, all references to RtError should be renamed to RtMidiError and the RtError.h file should be deleted.  The Windows Kernel Streaming support was removed because it was uncompilable and incomplete.
-
-\section download Download
-
-Latest Release (30 March 2014): <A href="http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-2.1.0.tar.gz">Version 2.1.0</A>
-
-\section start Getting Started
-
-The first thing that must be done when using RtMidi is to create an instance of the RtMidiIn or RtMidiOut subclasses.  RtMidi is an abstract base class, which itself cannot be instantiated.  Each default constructor attempts to establish any necessary "connections" with the underlying MIDI system.  RtMidi uses C++ exceptions to report errors, necessitating try/catch blocks around many member functions.  An RtMidiError can be thrown during instantiation in some circumstances.  A warning message may also be reported if no MIDI devices are found during instantiation.  The RtMidi classes have been designed to work with "hot pluggable" or virtual (software) MIDI devices, making it possible to connect to MIDI devices that may not have been present when the classes were instantiated.  The following code example demonstrates default object construction and destruction:
-
-\code
-
-#include "RtMidi.h"
-
-int main()
-{
-  RtMidiIn *midiin = 0;
-
-  // RtMidiIn constructor
-  try {
-    midiin = new RtMidiIn();
-  }
-  catch (RtMidiError &error) {
-    // Handle the exception here
-    error.printMessage();
-  }
-
-  // Clean up
-  delete midiin;
-}
-\endcode
-
-Obviously, this example doesn't demonstrate any of the real functionality of RtMidi.  However, all uses of RtMidi must begin with construction and must end with class destruction.  Further, it is necessary that all class methods that can throw a C++ exception be called within a try/catch block.
-
-
-\section error Error Handling
-
-RtMidi uses a C++ exception handler called RtMidiError, which is
-declared and defined in RtMidi.h.  The RtMidiError class is quite
-simple but it does allow errors to be "caught" by RtMidiError::Type.
-Many RtMidi methods can "throw" an RtMidiError, most typically if a
-driver error occurs or an invalid function argument is specified.
-There are a number of cases within RtMidi where warning messages may
-be displayed but an exception is not thrown.  A client error callback
-function can be specified (via the RtMidi::setErrorCallback function)
-that is invoked when an error occurs. By default, error messages are
-not automatically displayed in RtMidi unless the preprocessor
-definition __RTMIDI_DEBUG__ is defined during compilation.  Messages
-associated with caught exceptions can be displayed with, for example,
-the RtMidiError::printMessage() function.
-
-
-\section probing Probing Ports
-
-A client generally must query the available MIDI ports before deciding which to use.  The following example outlines how this can be done.
-
-\code
-// midiprobe.cpp
-
-#include <iostream>
-#include <cstdlib>
-#include "RtMidi.h"
-
-int main()
-{
-  RtMidiIn  *midiin = 0;
-  RtMidiOut *midiout = 0;
-
-  // RtMidiIn constructor
-  try {
-    midiin = new RtMidiIn();
-  }
-  catch ( RtMidiError &error ) {
-    error.printMessage();
-    exit( EXIT_FAILURE );
-  }
-
-  // Check inputs.
-  unsigned int nPorts = midiin->getPortCount();
-  std::cout << "\nThere are " << nPorts << " MIDI input sources available.\n";
-  std::string portName;
-  for ( unsigned int i=0; i<nPorts; i++ ) {
-    try {
-      portName = midiin->getPortName(i);
-    }
-    catch ( RtMidiError &error ) {
-      error.printMessage();
-      goto cleanup;
-    }
-    std::cout << "  Input Port #" << i+1 << ": " << portName << '\n';
-  }
-
-  // RtMidiOut constructor
-  try {
-    midiout = new RtMidiOut();
-  }
-  catch ( RtMidiError &error ) {
-    error.printMessage();
-    exit( EXIT_FAILURE );
-  }
-
-  // Check outputs.
-  nPorts = midiout->getPortCount();
-  std::cout << "\nThere are " << nPorts << " MIDI output ports available.\n";
-  for ( unsigned int i=0; i<nPorts; i++ ) {
-    try {
-      portName = midiout->getPortName(i);
-    }
-    catch (RtMidiError &error) {
-      error.printMessage();
-      goto cleanup;
-    }
-    std::cout << "  Output Port #" << i+1 << ": " << portName << '\n';
-  }
-  std::cout << '\n';
-
-  // Clean up
- cleanup:
-  delete midiin;
-  delete midiout;
-
-  return 0;
-}
-\endcode
-
-\section output MIDI Output
-
-The RtMidiOut class provides simple functionality to immediately send messages over a MIDI connection.  No timing functionality is provided.
-
-In the following example, we omit necessary error checking and details regarding OS-dependent sleep functions.  For a complete example, see the \c midiout.cpp program in the \c tests directory.
-
-\code
-// midiout.cpp
-
-#include <iostream>
-#include <cstdlib>
-#include "RtMidi.h"
-
-int main()
-{
-  RtMidiOut *midiout = new RtMidiOut();
-  std::vector<unsigned char> message;
-
-  // Check available ports.
-  unsigned int nPorts = midiout->getPortCount();
-  if ( nPorts == 0 ) {
-    std::cout << "No ports available!\n";
-    goto cleanup;
-  }
-
-  // Open first available port.
-  midiout->openPort( 0 );
-
-  // Send out a series of MIDI messages.
-
-  // Program change: 192, 5
-  message.push_back( 192 );
-  message.push_back( 5 );
-  midiout->sendMessage( &message );
-
-  // Control Change: 176, 7, 100 (volume)
-  message[0] = 176;
-  message[1] = 7;
-  message.push_back( 100 );
-  midiout->sendMessage( &message );
-
-  // Note On: 144, 64, 90
-  message[0] = 144;
-  message[1] = 64;
-  message[2] = 90;
-  midiout->sendMessage( &message );
-
-  SLEEP( 500 ); // Platform-dependent ... see example in tests directory.
-
-  // Note Off: 128, 64, 40
-  message[0] = 128;
-  message[1] = 64;
-  message[2] = 40;
-  midiout->sendMessage( &message );
-
-  // Clean up
- cleanup:
-  delete midiout;
-
-  return 0;
-}
-\endcode
-
-
-\section input MIDI Input
-
-The RtMidiIn class uses an internal callback function or thread to receive incoming MIDI messages from a port or device.  These messages are then either queued and read by the user via calls to the RtMidiIn::getMessage() function or immediately passed to a user-specified callback function (which must be "registered" using the RtMidiIn::setCallback() function).  We'll provide examples of both usages.
-
-The RtMidiIn class provides the RtMidiIn::ignoreTypes() function to specify that certain MIDI message types be ignored.  By default, system exclusive, timing, and active sensing messages are ignored.
-
-\subsection qmidiin Queued MIDI Input
-
-The RtMidiIn::getMessage() function does not block.  If a MIDI message is available in the queue, it is copied to the user-provided \c std::vector<unsigned char> container.  When no MIDI message is available, the function returns an empty container.  The default maximum MIDI queue size is 1024 messages.  This value may be modified with the RtMidiIn::setQueueSizeLimit() function.  If the maximum queue size limit is reached, subsequent incoming MIDI messages are discarded until the queue size is reduced.
-
-In the following example, we omit some necessary error checking and details regarding OS-dependent sleep functions.  For a more complete example, see the \c qmidiin.cpp program in the \c tests directory.
-
-\code
-// qmidiin.cpp
-
-#include <iostream>
-#include <cstdlib>
-#include <signal.h>
-#include "RtMidi.h"
-
-bool done;
-static void finish(int ignore){ done = true; }
-
-int main()
-{
-  RtMidiIn *midiin = new RtMidiIn();
-  std::vector<unsigned char> message;
-  int nBytes, i;
-  double stamp;
-
-  // Check available ports.
-  unsigned int nPorts = midiin->getPortCount();
-  if ( nPorts == 0 ) {
-    std::cout << "No ports available!\n";
-    goto cleanup;
-  }
-  midiin->openPort( 0 );
-
-  // Don't ignore sysex, timing, or active sensing messages.
-  midiin->ignoreTypes( false, false, false );
-
-  // Install an interrupt handler function.
-  done = false;
-  (void) signal(SIGINT, finish);
-
-  // Periodically check input queue.
-  std::cout << "Reading MIDI from port ... quit with Ctrl-C.\n";
-  while ( !done ) {
-    stamp = midiin->getMessage( &message );
-    nBytes = message.size();
-    for ( i=0; i<nBytes; i++ )
-      std::cout << "Byte " << i << " = " << (int)message[i] << ", ";
-    if ( nBytes > 0 )
-      std::cout << "stamp = " << stamp << std::endl;
-
-    // Sleep for 10 milliseconds ... platform-dependent.
-    SLEEP( 10 );
-  }
-
-  // Clean up
- cleanup:
-  delete midiin;
-
-  return 0;
-}
-\endcode
-
-\subsection cmidiin MIDI Input with User Callback
-
-When set, a user-provided callback function will be invoked after the input of a complete MIDI message.  It is possible to provide a pointer to user data that can be accessed in the callback function (not shown here).  It is necessary to set the callback function immediately after opening the port to avoid having incoming messages written to the queue (which is not emptied when a callback function is set).  If you are worried about this happening, you can check the queue using the RtMidi::getMessage() function to verify it is empty (after the callback function is set).
-
-In the following example, we omit some necessary error checking.  For a more complete example, see the \c cmidiin.cpp program in the \c tests directory.
-
-\code
-// cmidiin.cpp
-
-#include <iostream>
-#include <cstdlib>
-#include "RtMidi.h"
-
-void mycallback( double deltatime, std::vector< unsigned char > *message, void *userData )
-{
-  unsigned int nBytes = message->size();
-  for ( unsigned int i=0; i<nBytes; i++ )
-    std::cout << "Byte " << i << " = " << (int)message->at(i) << ", ";
-  if ( nBytes > 0 )
-    std::cout << "stamp = " << deltatime << std::endl;
-}
-
-int main()
-{
-  RtMidiIn *midiin = new RtMidiIn();
-
-  // Check available ports.
-  unsigned int nPorts = midiin->getPortCount();
-  if ( nPorts == 0 ) {
-    std::cout << "No ports available!\n";
-    goto cleanup;
-  }
-
-  midiin->openPort( 0 );
-
-  // Set our callback function.  This should be done immediately after
-  // opening the port to avoid having incoming messages written to the
-  // queue.
-  midiin->setCallback( &mycallback );
-
-  // Don't ignore sysex, timing, or active sensing messages.
-  midiin->ignoreTypes( false, false, false );
-
-  std::cout << "\nReading MIDI input ... press <enter> to quit.\n";
-  char input;
-  std::cin.get(input);
-
-  // Clean up
- cleanup:
-  delete midiin;
-
-  return 0;
-}
-\endcode
-
-\section virtual Virtual Ports
-
-The Linux ALSA, Macintosh CoreMIDI and JACK APIs allow for the establishment of virtual input and output MIDI ports to which other software clients can connect.  RtMidi incorporates this functionality with the RtMidiIn::openVirtualPort() and RtMidiOut::openVirtualPort() functions.  Any messages sent with the RtMidiOut::sendMessage() function will also be transmitted through an open virtual output port.  If a virtual input port is open and a user callback function is set, the callback function will be invoked when messages arrive via that port.  If a callback function is not set, the user must poll the input queue to check whether messages have arrived.  No notification is provided for the establishment of a client connection via a virtual port.
-
-\section compiling Compiling
-
-In order to compile RtMidi for a specific OS and API, it is necessary to supply the appropriate preprocessor definition and library within the compiler statement:
-<P>
-
-<TABLE BORDER=2 COLS=5 WIDTH="100%">
-<TR BGCOLOR="beige">
-  <TD WIDTH="5%"><B>OS:</B></TD>
-  <TD WIDTH="5%"><B>MIDI API:</B></TD>
-  <TD WIDTH="5%"><B>Preprocessor Definition:</B></TD>
-  <TD WIDTH="5%"><B>Library or Framework:</B></TD>
-  <TD><B>Example Compiler Statement:</B></TD>
-</TR>
-<TR>
-  <TD>Linux</TD>
-  <TD>ALSA Sequencer</TD>
-  <TD>__LINUX_ALSA__</TD>
-  <TD><TT>asound, pthread</TT></TD>
-  <TD><TT>g++ -Wall -D__LINUX_ALSA__ -o midiprobe midiprobe.cpp RtMidi.cpp -lasound -lpthread</TT></TD>
-</TR>
-<TR>
-  <TD>Linux or Mac</TD>
-  <TD>JACK MIDI</TD>
-  <TD>__UNIX_JACK__</TD>
-  <TD><TT>jack</TT></TD>
-  <TD><TT>g++ -Wall -D__UNIX_JACK__ -o midiprobe midiprobe.cpp RtMidi.cpp -ljack</TT></TD>
-</TR>
-<TR>
-  <TD>Macintosh OS X</TD>
-  <TD>CoreMIDI</TD>
-  <TD>__MACOSX_CORE__</TD>
-  <TD><TT>CoreMIDI, CoreAudio, CoreFoundation</TT></TD>
-  <TD><TT>g++ -Wall -D__MACOSX_CORE__ -o midiprobe midiprobe.cpp RtMidi.cpp -framework CoreMIDI -framework CoreAudio -framework CoreFoundation</TT></TD>
-</TR>
-<TR>
-  <TD>Windows</TD>
-  <TD>Multimedia Library</TD>
-  <TD>__WINDOWS_MM__</TD>
-  <TD><TT>winmm.lib, multithreaded</TT></TD>
-  <TD><I>compiler specific</I></TD>
-</TR>
-</TABLE>
-<P>
-
-The example compiler statements above could be used to compile the <TT>midiprobe.cpp</TT> example file, assuming that <TT>midiprobe.cpp</TT>, <TT>RtMidi.h</TT> and <TT>RtMidi.cpp</TT> all exist in the same directory.
-
-\section debug Debugging
-
-If you are having problems getting RtMidi to run on your system, try passing the preprocessor definition <TT>__RTMIDI_DEBUG__</TT> to the compiler (or define it in RtMidi.h).  A variety of warning messages will be displayed that may help in determining the problem.  Also try using the programs included in the <tt>tests</tt> directory.  The program <tt>midiprobe</tt> displays the queried capabilities of all MIDI ports found.
-
-\section multi Using Simultaneous Multiple APIs
-
-Support for each MIDI API is encapsulated in specific MidiInApi or MidiOutApi subclasses, making it possible to compile and instantiate multiple API-specific subclasses on a given operating system.  For example, one can compile both CoreMIDI and JACK support on the OS-X operating system by providing the appropriate preprocessor definitions for each.  In a run-time situation, one might first attempt to determine whether any JACK ports are available.  This can be done by specifying the api argument RtMidi::UNIX_JACK when attempting to create an instance of RtMidiIn or RtMidiOut.  If no available ports are found, then an instance of RtMidi with the api argument RtMidi::MACOSX_CORE can be created.  Alternately, if no api argument is specified, RtMidi will first look for JACK ports and if none are found, then CoreMIDI ports (in linux, the search order is JACK and then ALSA.  In theory, it should also be possible to have separate instances of RtMidi open at the same time with different underlying API support, though this has not been tested.
-
-The static function RtMidi::getCompiledApi() is provided to determine the available compiled API support.  The function RtMidi::getCurrentApi() indicates the API selected for a given RtMidi instance.
-
-\section apinotes API Notes
-
-RtMidi is designed to provide a common API across the various supported operating systems and audio libraries.  Despite that, some issues should be mentioned with regard to each.
-
-\subsection linux Linux:
-
-RtMidi for Linux was developed using the Fedora distribution.  Two different MIDI APIs are supported on Linux platforms: <A href="http://www.alsa-project.org/">ALSA</A> and <A href="http://jackit.sourceforge.net/">JACK</A>. A decision was made to not include support for the OSS API because the OSS API provides very limited functionality and because <A href="http://www.alsa-project.org/">ALSA</A> support is now incorporated in the Linux kernel.  The ALSA sequencer and JACK APIs allows for virtual software input and output ports. 
-
-\subsection macosx Macintosh OS X (CoreAudio):
-
-The Apple CoreMIDI API allows for the establishment of virtual input and output ports to which other software applications can connect.
-
-The RtMidi JACK support can be compiled on Macintosh OS-X systems, as well as in Linux.
-
-\subsection windowsds Windows (Multimedia Library):
-
-The \c configure script provides support for the MinGW compiler.
-
-The Windows Multimedia library MIDI calls used in RtMidi do not make use of streaming functionality.   Incoming system exclusive messages read by RtMidiIn are limited to a length as defined by the preprocessor definition RT_SYSEX_BUFFER_SIZE (set in RtMidi.cpp).  The default value is 1024.  There is no such limit for outgoing sysex messages via RtMidiOut.
-
-RtMidi was originally developed with Visual C++ version 6.0 but has been tested with Virtual Studio 2010.
-
-\section acknowledge Development & Acknowledgements
-
-RtMidi is on github (https://github.com/thestk/rtmidi).  Many thanks to the developers that are helping to maintain and improve RtMidi.
-
-In years past, the following people provided bug fixes and improvements:
-<UL>
-<LI>Sebastien Alaiwan (JACK memory leaks, Windows kernel streaming)</LI>
-<LI>Jean-Baptiste Berruchon (Windows sysex code)</LI>
-<LI>Pedro Lopez-Cabanillas (ALSA sequencer API, client naming)</LI>
-<LI>Jason Champion (MSW project file for library build)</LI>
-<LI>Eduardo Coutinho (Windows device names)</LI>
-<LI>Paul Dean (increment optimization)</LI>
-<LI>Luc Deschenaux (sysex issues)</LI>
-<LI>John Dey (OS-X timestamps)</LI>
-<LI>Christoph Eckert (ALSA sysex fixes)</LI>
-<LI>Martin Koegler (various fixes)</LI>
-<LI>Immanuel Litzroth (OS-X sysex fix)</LI>
-<LI>Jon McCormack (Snow Leopard updates)</LI>
-<LI>Axel Schmidt (client naming)</LI>
-<LI>Alexander Svetalkin (JACK MIDI)</LI>
-<LI>Casey Tucker (OS-X driver information, sysex sending)</LI>
-<LI>Bastiaan Verreijt (Windows sysex multi-buffer code)</LI>
-<LI>Dan Wilcox</LI>
-</UL>
-
-\section license License
-
-    RtMidi: realtime MIDI i/o C++ classes<BR>
-    Copyright (c) 2003-2014 Gary P. Scavone
-
-    Permission is hereby granted, free of charge, to any person
-    obtaining a copy of this software and associated documentation files
-    (the "Software"), to deal in the Software without restriction,
-    including without limitation the rights to use, copy, modify, merge,
-    publish, distribute, sublicense, and/or sell copies of the Software,
-    and to permit persons to whom the Software is furnished to do so,
-    subject to the following conditions:
-
-    The above copyright notice and this permission notice shall be
-    included in all copies or substantial portions of the Software.
-
-    Any person wishing to distribute modifications to the Software is
-    asked to send the modifications to the original developer so that
-    they can be incorporated into the canonical version.  This is,
-    however, not a binding provision of this license.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-    ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-    CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*/

BIN
doc/images/ccrma.gif


BIN
doc/images/mcgill.gif


+ 0 - 103
doc/release.txt

@@ -1,103 +0,0 @@
-RtMidi - a set of C++ classes that provides a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK), and Windows (Multimedia, Kernel Streaming).
-
-By Gary P. Scavone, 2003-2014
-
-v2.1.0: (30 March 2014)
-- renamed RtError class to RtMidiError and embedded it in RtMidi.h (and deleted RtError.h)
-- fix to CoreMidi implementation to support dynamic port changes
-- removed global ALSA sequencer objects because they were not thread safe (Martin Koegler)
-- fix for ALSA timing ignore flag (Devin Anderson)
-- fix for ALSA incorrect use of snd_seq_create_port() function (Tobias Schlemmer)
-- fix for international character support in CoreMidi (Martin Finke)
-- fix for unicode conversion in WinMM (Dan Wilcox)
-- added custom error hook that allows the client to capture an RtMidi error outside of the RtMidi code (Pavel Mogilevskiy)
-- added RtMidi::isPortOpen function (Pavel Mogilevskiy)
-- updated OS-X sysex sending mechanism to use normal message sending, which fixes a problem where virtual ports didn't receive sysex messages
-- Windows update to avoid lockups when shutting down while sending/receiving sysex messages (ptarabbia)
-- OS-X fix to avoid empty messages in callbacks when ignoring sysex messages and split sysexes are received (codepainters)
-- ALSA openPort fix to better distinguish sender and receiver (Russell Smyth)
-- Windows Kernel Streaming support removed because it was uncompilable and incomplete
-
-v2.0.1: (26 July 2012)
-- small fixes for problems reported by Chris Arndt (scoping, preprocessor, and include)
-
-v2.0.0: (18 June 2012)
-- revised structure to support multiple simultaneous compiled APIs
-- revised ALSA client hierarchy so subsequent instances share same client (thanks to Dan Wilcox)
-- added beta Windows kernel streaming support (thanks to Sebastien Alaiwan)
-- updates to compile as a shared library or dll
-- updated license
-- various memory-leak fixes (thanks to Sebastien Alaiwan and Martin Koegler)
-- fix for continue sysex problem (thanks to Luc Deschenaux)
-- removed SGI (IRIX) support
-
-v1.0.15: (11 August 2011)
-- updates for wide character support in Windows
-- stopped using std::queue and implemented internal MIDI ring buffer (for thread safety ... thanks to Michael Behrman)
-- removal of the setQueueSizeLimit() function ... queue size limit now an optional arguement to constructor
-
-v1.0.14: (17 April 2011)
-- bug fix to Jack MIDI support (thanks to Alexander Svetalkin and Pedro Lopez-Cabanillas)
-
-v1.0.13: (7 April 2011)
-- updated RtError.h to the same version as in RtAudio
-- new Jack MIDI support in Linux (thanks to Alexander Svetalkin)
-
-v1.0.12: (17 February 2011)
-- Windows 64-bit pointer fixes (thanks to Ward Kockelkorn)
-- removed possible exceptions from getPortName() functions
-- changed sysex sends in OS-X to use MIDISendSysex() function (thanks to Casey Tucker)
-- bug fixes to time code parsing in OS-X and ALSA (thanks to Greg)
-- added MSW project file to build as library (into lib/ directory ... thanks to Jason Champion)
-
-v1.0.11: (29 January 2010)
-- added CoreServices/CoreServices.h include for OS-X 10.6 and gcc4.2 compile (thanks to Jon McCormack)
-- various increment optimizations (thanks to Paul Dean)
-- fixed incorrectly located snd_seq_close() function in ALSA API (thanks to Pedro Lopez-Cabanillas)
-- updates to Windows sysex code to better deal with possible delivery problems (thanks to Bastiaan Verreijt)
-
-v1.0.10: (3 June 2009)
-- fix adding timestamp to OS-X sendMessage() function (thanks to John Dey)
-
-v1.0.9: (30 April 2009)
-- added #ifdef AVOID_TIMESTAMPING to conditionally compile support for event timestamping of ALSA sequencer events. This is useful for programs not needing timestamps, saving valuable system resources.
-- updated functionality in OSX_CORE for getting driver name (thanks to Casey Tucker)
-
-v1.0.8: (29 January 2009)
-- bug fixes for concatenating segmented sysex messages in ALSA (thanks to Christoph Eckert)
-- update to ALSA sequencer port enumeration (thanks to Pedro Lopez-Cabonillas)
-- bug fixes for concatenating segmented sysex messages in OS-X (thanks to Emmanuel Litzroth)
-- added functionality for naming clients (thanks to Pedro Lopez-Cabonillas and Axel Schmidt)
-- bug fix in Windows when receiving sysex messages if the ignore flag was set (thanks to Pedro Lopez-Cabonillas)
-
-v1.0.7: (7 December 2007)
-- configure and Makefile changes for MinGW
-- renamed midiinfo.cpp to midiprobe.cpp and updated VC++ project/workspace
-
-v1.0.6: (9 March 2006)
-- bug fix for timestamp problem in ALSA  (thanks to Pedro Lopez-Cabanillas)
-
-v1.0.5: (18 November 2005)
-- added optional port name to openVirtualPort() functions
-- fixed UNICODE problem in Windows getting device names (thanks Eduardo Coutinho!).
-- fixed bug in Windows with respect to getting Sysex data (thanks Jean-Baptiste Berruchon!)
-
-v1.0.4: (14 October 2005)
-- added check for status byte == 0xF8 if ignoring timing messages
-- changed pthread attribute to SCHED_OTHER (from SCHED_RR) to avoid thread problem when realtime cababilities are not enabled.
-- now using ALSA sequencer time stamp information (thanks to Pedro Lopez-Cabanillas)
-- fixed memory leak in ALSA implementation
-- now concatenate segmented sysex messages in ALSA
-
-v1.0.3: (22 November 2004)
-- added common pure virtual functions to RtMidi abstract base class
-
-v1.0.2: (21 September 2004)
-- added warning messages to openVirtualPort() functions in Windows and Irix (where it can't be implemented)
-
-v1.0.1: (20 September 2004)
-- changed ALSA preprocessor definition to __LINUX_ALSASEQ__
-
-v1.0.0: (17 September 2004)
-- first release of new independent class with both input and output functionality
-

+ 0 - 0
RtMidi.h → include/RtMidi.h


+ 0 - 12
librtmidi.pc.in

@@ -1,12 +0,0 @@
-prefix=@prefix@
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include        
-
-Name: librtmidi
-Description: RtMidi - a set of C++ classes that provide a common API for realtime MIDI input/output
-Version: 2.1.0
-Requires: @req@ 
-Libs: -L${libdir} -lrtmidi
-Libs.private: -lpthread
-Cflags: -pthread -I${includedir} @CPPFLAGS@

+ 0 - 8
msw/.gitignore

@@ -1,8 +0,0 @@
-*.sdf
-
-*.opensdf
-*.suo
-*.vcxproj.user
-ipch
-Debug
-Release

+ 0 - 1
msw/readme

@@ -1 +0,0 @@
-This directory contains a Visual Studio 2008 project, contributed by Jason Champion, to build rtmidi as a library.  The library builds to the <rtmidi-x.x.x>\lib directory.

+ 0 - 20
msw/rtmidilib.sln

@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rtmidilib", "rtmidilib.vcxproj", "{EBFE5EB3-182A-47A6-922B-52ECF777F6A3}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Win32 = Debug|Win32
-		Release|Win32 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{EBFE5EB3-182A-47A6-922B-52ECF777F6A3}.Debug|Win32.ActiveCfg = Debug|Win32
-		{EBFE5EB3-182A-47A6-922B-52ECF777F6A3}.Debug|Win32.Build.0 = Debug|Win32
-		{EBFE5EB3-182A-47A6-922B-52ECF777F6A3}.Release|Win32.ActiveCfg = Release|Win32
-		{EBFE5EB3-182A-47A6-922B-52ECF777F6A3}.Release|Win32.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal

+ 0 - 178
msw/rtmidilib.vcproj

@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9.00"
-	Name="rtmidilib"
-	ProjectGUID="{EBFE5EB3-182A-47A6-922B-52ECF777F6A3}"
-	RootNamespace="rtmidilib"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="4"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="__WINDOWS_MM__"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="..\lib\rtmidid.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="4"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="__WINDOWS_MM__"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				OutputFile="..\lib\rtmidi.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\RtMidi.cpp"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<File
-				RelativePath="..\RtError.h"
-				>
-			</File>
-			<File
-				RelativePath="..\RtMidi.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 87
msw/rtmidilib.vcxproj

@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{EBFE5EB3-182A-47A6-922B-52ECF777F6A3}</ProjectGuid>
-    <RootNamespace>rtmidilib</RootNamespace>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-    <CharacterSet>Unicode</CharacterSet>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-    <CharacterSet>Unicode</CharacterSet>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup>
-    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>__WINDOWS_MM__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MinimalRebuild>true</MinimalRebuild>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
-    </ClCompile>
-    <Lib>
-      <OutputFile>..\lib\rtmidid.lib</OutputFile>
-    </Lib>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <Optimization>MaxSpeed</Optimization>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>__WINDOWS_MM__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-    </ClCompile>
-    <Lib>
-      <OutputFile>..\lib\rtmidi.lib</OutputFile>
-    </Lib>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ClCompile Include="..\Midi.cpp" />
-    <ClCompile Include="..\MidiMessage.cpp" />
-    <ClCompile Include="..\RtMidi.cpp" />
-    <ClCompile Include="..\Launchpad.cpp" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="..\Midi.h" />
-    <ClInclude Include="..\MidiMessage.h" />
-    <ClInclude Include="..\RtMidi.h" />
-    <ClInclude Include="..\Launchpad.h" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>

+ 0 - 45
msw/rtmidilib.vcxproj.filters

@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup>
-    <Filter Include="Source Files">
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
-    </Filter>
-    <Filter Include="Header Files">
-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
-    </Filter>
-    <Filter Include="Resource Files">
-      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
-      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
-    </Filter>
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="..\RtMidi.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="..\MidiMessage.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="..\Midi.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="..\Launchpad.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="..\RtMidi.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="..\Midi.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="..\MidiMessage.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="..\Launchpad.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-  </ItemGroup>
-</Project>

+ 0 - 59
readme

@@ -1,59 +0,0 @@
-RtMidi - a set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK) and Windows (Multimedia).
-
-By Gary P. Scavone, 2003-2014.
-
-This distribution of RtMidi contains the following:
-
-doc:      RtMidi documentation (see doc/html/index.html)
-tests:    example RtMidi programs
-
-On unix systems, type "./configure" in the top level directory, then "make" in the tests/ directory to compile the test programs.  In Windows, open the Visual C++ workspace file located in the tests/ directory.
-
-If you checked out the code from git, please run "autoconf" before "./configure".
-
-OVERVIEW:
-
-RtMidi is a set of C++ classes (RtMidiIn, RtMidiOut, and API specific classes) that provide a common API (Application Programming Interface) for realtime MIDI input/output across Linux (ALSA, JACK), Macintosh OS X (CoreMIDI, JACK), and Windows (Multimedia Library) operating systems.  RtMidi significantly simplifies the process of interacting with computer MIDI hardware and software.  It was designed with the following goals:
-
-  - object oriented C++ design
-  - simple, common API across all supported platforms
-  - only one header and one source file for easy inclusion in programming projects
-  - MIDI device enumeration
-
-MIDI input and output functionality are separated into two classes, RtMidiIn and RtMidiOut.  Each class instance supports only a single MIDI connection.  RtMidi does not provide timing functionality (i.e., output messages are sent immediately).  Input messages are timestamped with delta times in seconds (via a double floating point type).  MIDI data is passed to the user as raw bytes using an std::vector<unsigned char>.
-
-FURTHER READING:
-
-For complete documentation on RtMidi, see the doc directory of the distribution or surf to http://music.mcgill.ca/~gary/rtmidi/.
-
-
-LEGAL AND ETHICAL:
-
-The RtMidi license is similar to the the MIT License, with the added "feature" that modifications be sent to the developer.
-
-    RtMidi: realtime MIDI i/o C++ classes
-    Copyright (c) 2003-2014 Gary P. Scavone
-
-    Permission is hereby granted, free of charge, to any person
-    obtaining a copy of this software and associated documentation files
-    (the "Software"), to deal in the Software without restriction,
-    including without limitation the rights to use, copy, modify, merge,
-    publish, distribute, sublicense, and/or sell copies of the Software,
-    and to permit persons to whom the Software is furnished to do so,
-    subject to the following conditions:
-
-    The above copyright notice and this permission notice shall be
-    included in all copies or substantial portions of the Software.
-
-    Any person wishing to distribute modifications to the Software is
-    asked to send the modifications to the original developer so that
-    they can be incorporated into the canonical version.  This is,
-    however, not a binding provision of this license.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-    ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-    CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 0 - 19
rtmidi-config.in

@@ -1,19 +0,0 @@
-#! /bin/sh
-if (test "x$#" != "x1") ; then
-  echo "Usage: $0 [--libs | --cxxflags | --cppflags]"
-  exit;
-fi
-
-LIBRARY="@LIBS@"
-CXXFLAGS="@CXXFLAGS@"
-CPPFLAGS="@CPPFLAGS@"
-
-if (test "x$1" = "x--libs") ; then
-  echo "$LIBRARY -lrtmidi"
-elif (test "x$1" = "x--cxxflags") ; then
-  echo "$CXXFLAGS"
-elif (test "x$1" = "x--cppflags") ; then
-  echo "$CPPFLAGS"
-else
-  echo "Unknown option: $1"
-fi

+ 1 - 0
tests/.gitignore

@@ -0,0 +1 @@
+/bin

+ 9 - 0
tests/CMakeLists.txt

@@ -0,0 +1,9 @@
+cmake_minimum_required (VERSION 2.8.0)
+project (midi-tests)
+
+include_directories("${CMAKE_SOURCE_DIR}/..")
+include_directories("${CMAKE_SOURCE_DIR}/../include")
+link_directories("${CMAKE_SOURCE_DIR}/../lib")
+
+add_executable(midiout midiout.cpp)
+target_link_libraries(midiout midi /usr/local/lib/librtmidi.so.2) 

+ 0 - 0
tests/Debug/.placeholder


+ 0 - 55
tests/Makefile.in

@@ -1,55 +0,0 @@
-### Do not edit -- Generated by 'configure --with-whatever' from Makefile.in
-### RtMidi tests Makefile - for various flavors of unix
-
-PROGRAMS = midiprobe midiout qmidiin cmidiin sysextest launchpad launchpad-screen
-RM = /bin/rm
-SRC_PATH = ..
-INCLUDE = @top_srcdir@
-OBJECT_PATH = @object_path@
-vpath %.o $(OBJECT_PATH)
-
-OBJECTS	=	@top_srcdir@/RtMidi.o
-
-CC       = @CXX@
-DEFS     = @CPPFLAGS@
-CFLAGS   = @CXXFLAGS@
-CFLAGS  += -I$(INCLUDE) -I$(INCLUDE)/include
-LIBRARY  = @LIBS@
-
-%.o : $(SRC_PATH)/%.cpp
-	$(CC) $(CFLAGS) $(DEFS) -c $(<) -o $(OBJECT_PATH)/$@
-
-all : $(PROGRAMS)
-
-midiprobe : @srcdir@/midiprobe.cpp $(OBJECTS)
-	$(CC) $(CFLAGS) $(DEFS) -o midiprobe $^ $(LIBRARY)
-
-midiout : @srcdir@/midiout.cpp $(OBJECTS)
-	$(CC) $(CFLAGS) $(DEFS) -o midiout $^ $(LIBRARY)
-
-qmidiin : @srcdir@/qmidiin.cpp $(OBJECTS)
-	$(CC) $(CFLAGS) $(DEFS) -o qmidiin $^ $(LIBRARY)
-
-cmidiin : @srcdir@/cmidiin.cpp $(OBJECTS)
-	$(CC) $(CFLAGS) $(DEFS) -o cmidiin $^ $(LIBRARY)
-
-sysextest : @srcdir@/sysextest.cpp $(OBJECTS)
-	$(CC) $(CFLAGS) $(DEFS) -o sysextest $^ $(LIBRARY)
-
-launchpad : @srcdir@/launchpad.cpp $(OBJECTS)
-	$(CC) $(CFLAGS) $(DEFS) -o launchpad $^ $(LIBRARY) ../MidiMessage.o ../Midi.o ../Launchpad.o
-
-launchpad-screen : @srcdir@/launchpad-screen.cpp $(OBJECTS)
-	$(CC) $(CFLAGS) $(DEFS) -o launchpad-screen $^ $(LIBRARY) ../MidiMessage.o ../Midi.o ../Launchpad.o
-
-clean : 
-	$(RM) -f $(OBJECT_PATH)/*.o
-	$(RM) -f $(PROGRAMS) *.exe
-	$(RM) -f *~
-	$(RM) -fR *.dSYM
-
-distclean: clean
-	$(RM) -f Makefile
-
-strip : 
-	strip $(PROGRAMS)

+ 0 - 0
tests/Release/.placeholder


+ 0 - 77
tests/RtMidi.dsw

@@ -1,77 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "cmidiin"=".\cmidiin.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "midiout"=".\midiout.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "midiprobe"=".\midiprobe.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "qmidiin"=".\qmidiin.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "sysextest"=".\sysextest.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-

+ 0 - 111
tests/cmidiin.cpp

@@ -1,111 +0,0 @@
-//*****************************************//
-//  cmidiin.cpp
-//  by Gary Scavone, 2003-2004.
-//
-//  Simple program to test MIDI input and
-//  use of a user callback function.
-//
-//*****************************************//
-
-#include <iostream>
-#include <cstdlib>
-#include "RtMidi.h"
-
-void usage( void ) {
-  // Error function in case of incorrect command-line
-  // argument specifications.
-  std::cout << "\nuseage: cmidiin <port>\n";
-  std::cout << "    where port = the device to use (default = 0).\n\n";
-  exit( 0 );
-}
-
-void mycallback( double deltatime, std::vector< unsigned char > *message, void */*userData*/ )
-{
-  unsigned int nBytes = message->size();
-  for ( unsigned int i=0; i<nBytes; i++ )
-    std::cout << "Byte " << i << " = " << (int)message->at(i) << ", ";
-  if ( nBytes > 0 )
-    std::cout << "stamp = " << deltatime << std::endl;
-}
-
-// This function should be embedded in a try/catch block in case of
-// an exception.  It offers the user a choice of MIDI ports to open.
-// It returns false if there are no ports available.
-bool chooseMidiPort( RtMidiIn *rtmidi );
-
-int main( int argc, char ** /*argv[]*/ )
-{
-  RtMidiIn *midiin = 0;
-
-  // Minimal command-line check.
-  if ( argc > 2 ) usage();
-
-  try {
-
-    // RtMidiIn constructor
-    midiin = new RtMidiIn();
-
-    // Call function to select port.
-    if ( chooseMidiPort( midiin ) == false ) goto cleanup;
-
-    // Set our callback function.  This should be done immediately after
-    // opening the port to avoid having incoming messages written to the
-    // queue instead of sent to the callback function.
-    midiin->setCallback( &mycallback );
-
-    // Don't ignore sysex, timing, or active sensing messages.
-    midiin->ignoreTypes( false, false, false );
-
-    std::cout << "\nReading MIDI input ... press <enter> to quit.\n";
-    char input;
-    std::cin.get(input);
-
-  } catch ( RtMidiError &error ) {
-    error.printMessage();
-  }
-
- cleanup:
-
-  delete midiin;
-
-  return 0;
-}
-
-bool chooseMidiPort( RtMidiIn *rtmidi )
-{
-  std::cout << "\nWould you like to open a virtual input port? [y/N] ";
-
-  std::string keyHit;
-  std::getline( std::cin, keyHit );
-  if ( keyHit == "y" ) {
-    rtmidi->openVirtualPort();
-    return true;
-  }
-
-  std::string portName;
-  unsigned int i = 0, nPorts = rtmidi->getPortCount();
-  if ( nPorts == 0 ) {
-    std::cout << "No input ports available!" << std::endl;
-    return false;
-  }
-
-  if ( nPorts == 1 ) {
-    std::cout << "\nOpening " << rtmidi->getPortName() << std::endl;
-  }
-  else {
-    for ( i=0; i<nPorts; i++ ) {
-      portName = rtmidi->getPortName(i);
-      std::cout << "  Input port #" << i << ": " << portName << '\n';
-    }
-
-    do {
-      std::cout << "\nChoose a port number: ";
-      std::cin >> i;
-    } while ( i >= nPorts );
-    std::getline( std::cin, keyHit );  // used to clear out stdin
-  }
-
-  rtmidi->openPort( i );
-
-  return true;
-}

+ 0 - 110
tests/cmidiin.dsp

@@ -1,110 +0,0 @@
-# Microsoft Developer Studio Project File - Name="cmidiin" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=cmidiin - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "cmidiin.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "cmidiin.mak" CFG="cmidiin - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "cmidiin - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "cmidiin - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "cmidiin - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "cmidiin___Win32_Release"
-# PROP BASE Intermediate_Dir "cmidiin___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "cmidiin - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "cmidiin___Win32_Debug"
-# PROP BASE Intermediate_Dir "cmidiin___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "cmidiin - Win32 Release"
-# Name "cmidiin - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\cmidiin.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\RtMidi.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\RtMidi.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project

+ 10 - 138
tests/midiout.cpp

@@ -1,146 +1,18 @@
-//*****************************************//
-//  midiout.cpp
-//  by Gary Scavone, 2003-2004.
-//
-//  Simple program to test MIDI output.
-//
-//*****************************************//
-
 #include <iostream>
-#include <cstdlib>
-#include "RtMidi.h"
-
-// Platform-dependent sleep routines.
-#if defined(__WINDOWS_MM__)
-  #include <windows.h>
-  #define SLEEP( milliseconds ) Sleep( (DWORD) milliseconds ) 
-#else // Unix variants
-  #include <unistd.h>
-  #define SLEEP( milliseconds ) usleep( (unsigned long) (milliseconds * 1000.0) )
-#endif
-
-// This function should be embedded in a try/catch block in case of
-// an exception.  It offers the user a choice of MIDI ports to open.
-// It returns false if there are no ports available.
-bool chooseMidiPort( RtMidiOut *rtmidi );
-
-int main( void )
-{
-  RtMidiOut *midiout = 0;
-  std::vector<unsigned char> message;
-
-  // RtMidiOut constructor
-  try {
-    midiout = new RtMidiOut();
-  }
-  catch ( RtMidiError &error ) {
-    error.printMessage();
-    exit( EXIT_FAILURE );
-  }
-
-  // Call function to select port.
-  try {
-    if ( chooseMidiPort( midiout ) == false ) goto cleanup;
-  }
-  catch ( RtMidiError &error ) {
-    error.printMessage();
-    goto cleanup;
-  }
-
-  // Send out a series of MIDI messages.
-
-  // Program change: 192, 5
-  message.push_back( 192 );
-  message.push_back( 5 );
-  midiout->sendMessage( &message );
-
-  SLEEP( 500 );
-
-  message[0] = 0xF1;
-  message[1] = 60;
-  midiout->sendMessage( &message );
-
-  // Control Change: 176, 7, 100 (volume)
-  message[0] = 176;
-  message[1] = 7;
-  message.push_back( 100 );
-  midiout->sendMessage( &message );
+#include "Output.h"
 
-  // Note On: 144, 64, 90
-  message[0] = 144;
-  message[1] = 64;
-  message[2] = 90;
-  midiout->sendMessage( &message );
+using namespace std;
+using namespace midi;
 
-  SLEEP( 500 );
-
-  // Note Off: 128, 64, 40
-  message[0] = 128;
-  message[1] = 64;
-  message[2] = 40;
-  midiout->sendMessage( &message );
-
-  SLEEP( 500 );
-
-  // Control Change: 176, 7, 40
-  message[0] = 176;
-  message[1] = 7;
-  message[2] = 40;
-  midiout->sendMessage( &message );
-
-  SLEEP( 500 );
-
-  // Sysex: 240, 67, 4, 3, 2, 247
-  message[0] = 240;
-  message[1] = 67;
-  message[2] = 4;
-  message.push_back( 3 );
-  message.push_back( 2 );
-  message.push_back( 247 );
-  midiout->sendMessage( &message );
-
-  // Clean up
- cleanup:
-  delete midiout;
-
-  return 0;
-}
-
-bool chooseMidiPort( RtMidiOut *rtmidi )
+int main()
 {
-  std::cout << "\nWould you like to open a virtual output port? [y/N] ";
-
-  std::string keyHit;
-  std::getline( std::cin, keyHit );
-  if ( keyHit == "y" ) {
-    rtmidi->openVirtualPort();
-    return true;
-  }
-
-  std::string portName;
-  unsigned int i = 0, nPorts = rtmidi->getPortCount();
-  if ( nPorts == 0 ) {
-    std::cout << "No output ports available!" << std::endl;
-    return false;
-  }
-
-  if ( nPorts == 1 ) {
-    std::cout << "\nOpening " << rtmidi->getPortName() << std::endl;
-  }
-  else {
-    for ( i=0; i<nPorts; i++ ) {
-      portName = rtmidi->getPortName(i);
-      std::cout << "  Output port #" << i << ": " << portName << '\n';
-    }
+    Output out;
+    out.openVirtualPort();
 
-    do {
-      std::cout << "\nChoose a port number: ";
-      std::cin >> i;
-    } while ( i >= nPorts );
-  }
+    cout << "press button to start... " << flush;
+    cin.ignore();
 
-  std::cout << "\n";
-  rtmidi->openPort( i );
+    out.sendMessage(NoteOnMessage(3, 45, 127));
 
-  return true;
+    return 0;
 }

+ 0 - 110
tests/midiout.dsp

@@ -1,110 +0,0 @@
-# Microsoft Developer Studio Project File - Name="midiout" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=midiout - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "midiout.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "midiout.mak" CFG="midiout - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "midiout - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "midiout - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "midiout - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "midiout___Win32_Release"
-# PROP BASE Intermediate_Dir "midiout___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "midiout - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "midiout___Win32_Debug"
-# PROP BASE Intermediate_Dir "midiout___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "midiout - Win32 Release"
-# Name "midiout - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\midiout.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\RtMidi.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\RtMidi.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project

+ 0 - 71
tests/midiprobe.cpp

@@ -1,71 +0,0 @@
-// midiprobe.cpp
-//
-// Simple program to check MIDI inputs and outputs.
-//
-// by Gary Scavone, 2003-2012.
-
-#include <iostream>
-#include <cstdlib>
-#include <map>
-#include "RtMidi.h"
-
-int main()
-{
-  // Create an api map.
-  std::map<int, std::string> apiMap;
-  apiMap[RtMidi::MACOSX_CORE] = "OS-X CoreMidi";
-  apiMap[RtMidi::WINDOWS_MM] = "Windows MultiMedia";
-  apiMap[RtMidi::UNIX_JACK] = "Jack Client";
-  apiMap[RtMidi::LINUX_ALSA] = "Linux ALSA";
-  apiMap[RtMidi::RTMIDI_DUMMY] = "RtMidi Dummy";
-
-  std::vector< RtMidi::Api > apis;
-  RtMidi :: getCompiledApi( apis );
-
-  std::cout << "\nCompiled APIs:\n";
-  for ( unsigned int i=0; i<apis.size(); i++ )
-    std::cout << "  " << apiMap[ apis[i] ] << std::endl;
-
-  RtMidiIn  *midiin = 0;
-  RtMidiOut *midiout = 0;
-
-  try {
-
-    // RtMidiIn constructor ... exception possible
-    midiin = new RtMidiIn();
-
-    std::cout << "\nCurrent input API: " << apiMap[ midiin->getCurrentApi() ] << std::endl;
-
-    // Check inputs.
-    unsigned int nPorts = midiin->getPortCount();
-    std::cout << "\nThere are " << nPorts << " MIDI input sources available.\n";
-
-    for ( unsigned i=0; i<nPorts; i++ ) {
-      std::string portName = midiin->getPortName(i);
-      std::cout << "  Input Port #" << i+1 << ": " << portName << '\n';
-    }
-
-    // RtMidiOut constructor ... exception possible
-    midiout = new RtMidiOut();
-
-    std::cout << "\nCurrent output API: " << apiMap[ midiout->getCurrentApi() ] << std::endl;
-
-    // Check outputs.
-    nPorts = midiout->getPortCount();
-    std::cout << "\nThere are " << nPorts << " MIDI output ports available.\n";
-
-    for ( unsigned i=0; i<nPorts; i++ ) {
-      std::string portName = midiout->getPortName(i);
-      std::cout << "  Output Port #" << i+1 << ": " << portName << std::endl;
-    }
-    std::cout << std::endl;
-
-  } catch ( RtMidiError &error ) {
-    error.printMessage();
-  }
-
-  delete midiin;
-  delete midiout;
-
-  return 0;
-}

+ 0 - 110
tests/midiprobe.dsp

@@ -1,110 +0,0 @@
-# Microsoft Developer Studio Project File - Name="midiprobe" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=midiprobe - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "midiprobe.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "midiprobe.mak" CFG="midiprobe - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "midiprobe - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "midiprobe - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "midiprobe - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "midiprobe___Win32_Release"
-# PROP BASE Intermediate_Dir "midiprobe___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "midiprobe - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "midiprobe___Win32_Debug"
-# PROP BASE Intermediate_Dir "midiprobe___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /GZ  /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "midiprobe - Win32 Release"
-# Name "midiprobe - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\midiprobe.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\RtMidi.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\RtMidi.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project

+ 0 - 98
tests/qmidiin.cpp

@@ -1,98 +0,0 @@
-//*****************************************//
-//  qmidiin.cpp
-//  by Gary Scavone, 2003-2004.
-//
-//  Simple program to test MIDI input and
-//  retrieval from the queue.
-//
-//*****************************************//
-
-#include <iostream>
-#include <cstdlib>
-#include <signal.h>
-#include "RtMidi.h"
-
-// Platform-dependent sleep routines.
-#if defined(__WINDOWS_MM__)
-  #include <windows.h>
-  #define SLEEP( milliseconds ) Sleep( (DWORD) milliseconds ) 
-#else // Unix variants
-  #include <unistd.h>
-  #define SLEEP( milliseconds ) usleep( (unsigned long) (milliseconds * 1000.0) )
-#endif
-
-bool done;
-static void finish( int /*ignore*/ ){ done = true; }
-
-void usage( void ) {
-  // Error function in case of incorrect command-line
-  // argument specifications.
-  std::cout << "\nusage: qmidiin <port>\n";
-  std::cout << "    where port = the device to use (default = 0).\n\n";
-  exit( 0 );
-}
-
-int main( int argc, char *argv[] )
-{
-  RtMidiIn *midiin = 0;
-  std::vector<unsigned char> message;
-  int nBytes, i;
-  double stamp;
-
-  // Minimal command-line check.
-  if ( argc > 2 ) usage();
-
-  // RtMidiIn constructor
-  try {
-    midiin = new RtMidiIn();
-  }
-  catch ( RtMidiError &error ) {
-    error.printMessage();
-    exit( EXIT_FAILURE );
-  }
-
-  // Check available ports vs. specified.
-  unsigned int port = 0;
-  unsigned int nPorts = midiin->getPortCount();
-  if ( argc == 2 ) port = (unsigned int) atoi( argv[1] );
-  if ( port >= nPorts ) {
-    delete midiin;
-    std::cout << "Invalid port specifier!\n";
-    usage();
-  }
-
-  try {
-    midiin->openPort( port );
-  }
-  catch ( RtMidiError &error ) {
-    error.printMessage();
-    goto cleanup;
-  }
-
-  // Don't ignore sysex, timing, or active sensing messages.
-  midiin->ignoreTypes( false, false, false );
-
-  // Install an interrupt handler function.
-  done = false;
-  (void) signal(SIGINT, finish);
-
-  // Periodically check input queue.
-  std::cout << "Reading MIDI from port ... quit with Ctrl-C.\n";
-  while ( !done ) {
-    stamp = midiin->getMessage( &message );
-    nBytes = message.size();
-    for ( i=0; i<nBytes; i++ )
-      std::cout << "Byte " << i << " = " << (int)message[i] << ", ";
-    if ( nBytes > 0 )
-      std::cout << "stamp = " << stamp << std::endl;
-
-    // Sleep for 10 milliseconds.
-    SLEEP( 10 );
-  }
-
-  // Clean up
- cleanup:
-  delete midiin;
-
-  return 0;
-}

+ 0 - 110
tests/qmidiin.dsp

@@ -1,110 +0,0 @@
-# Microsoft Developer Studio Project File - Name="qmidiin" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=qmidiin - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "qmidiin.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "qmidiin.mak" CFG="qmidiin - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "qmidiin - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "qmidiin - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "qmidiin - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "qmidiin___Win32_Release"
-# PROP BASE Intermediate_Dir "qmidiin___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "qmidiin - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "qmidiin___Win32_Debug"
-# PROP BASE Intermediate_Dir "qmidiin___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "qmidiin - Win32 Release"
-# Name "qmidiin - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\qmidiin.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\RtMidi.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\RtMidi.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project

+ 0 - 152
tests/sysextest.cpp

@@ -1,152 +0,0 @@
-//*****************************************//
-//  sysextest.cpp
-//  by Gary Scavone, 2003-2005.
-//
-//  Simple program to test MIDI sysex sending and receiving.
-//
-//*****************************************//
-
-#include <iostream>
-#include <cstdlib>
-#include <typeinfo>
-#include "RtMidi.h"
-
-void usage( void ) {
-  std::cout << "\nuseage: sysextest N\n";
-  std::cout << "    where N = length of sysex message to send / receive.\n\n";
-  exit( 0 );
-}
-
-// Platform-dependent sleep routines.
-#if defined(__WINDOWS_MM__)
-  #include <windows.h>
-  #define SLEEP( milliseconds ) Sleep( (DWORD) milliseconds ) 
-#else // Unix variants
-  #include <unistd.h>
-  #define SLEEP( milliseconds ) usleep( (unsigned long) (milliseconds * 1000.0) )
-#endif
-
-// This function should be embedded in a try/catch block in case of
-// an exception.  It offers the user a choice of MIDI ports to open.
-// It returns false if there are no ports available.
-bool chooseMidiPort( RtMidi *rtmidi );
-
-void mycallback( double deltatime, std::vector< unsigned char > *message, void * /*userData*/ )
-{
-  unsigned int nBytes = message->size();
-  for ( unsigned int i=0; i<nBytes; i++ )
-    std::cout << "Byte " << i << " = " << (int)message->at(i) << ", ";
-  if ( nBytes > 0 )
-    std::cout << "stamp = " << deltatime << std::endl;
-}
-
-int main( int argc, char *argv[] )
-{
-  RtMidiOut *midiout = 0;
-  RtMidiIn *midiin = 0;
-  std::vector<unsigned char> message;
-  unsigned int i, nBytes;
-
-  // Minimal command-line check.
-  if ( argc != 2 ) usage();
-  nBytes = (unsigned int) atoi( argv[1] );
-
-  // RtMidiOut and RtMidiIn constructors
-  try {
-    midiout = new RtMidiOut();
-    midiin = new RtMidiIn();
-  }
-  catch ( RtMidiError &error ) {
-    error.printMessage();
-    goto cleanup;
-  }
-
-  // Don't ignore sysex, timing, or active sensing messages.
-  midiin->ignoreTypes( false, true, true );
-
-  try {
-    if ( chooseMidiPort( midiin ) == false ) goto cleanup;
-    if ( chooseMidiPort( midiout ) == false ) goto cleanup;
-  }
-  catch ( RtMidiError &error ) {
-    error.printMessage();
-    goto cleanup;
-  }
-
-  midiin->setCallback( &mycallback );
-
-  message.push_back( 0xF6 );
-  midiout->sendMessage( &message );
-  SLEEP( 500 ); // pause a little
-
-  // Create a long sysex message of numbered bytes and send it out ... twice.
-  for ( int n=0; n<2; n++ ) {
-    message.clear();
-    message.push_back( 240 );
-    for ( i=0; i<nBytes; i++ )
-      message.push_back( i % 128 );
-    message.push_back( 247 );
-    midiout->sendMessage( &message );
-
-    SLEEP( 500 ); // pause a little
-  }
-
-  // Clean up
- cleanup:
-  delete midiout;
-  delete midiin;
-
-  return 0;
-}
-
-bool chooseMidiPort( RtMidi *rtmidi )
-{
-  bool isInput = false;
-  if ( typeid( *rtmidi ) == typeid( RtMidiIn ) )
-    isInput = true;
-
-  if ( isInput )
-    std::cout << "\nWould you like to open a virtual input port? [y/N] ";
-  else
-    std::cout << "\nWould you like to open a virtual output port? [y/N] ";
-
-  std::string keyHit;
-  std::getline( std::cin, keyHit );
-  if ( keyHit == "y" ) {
-    rtmidi->openVirtualPort();
-    return true;
-  }
-
-  std::string portName;
-  unsigned int i = 0, nPorts = rtmidi->getPortCount();
-  if ( nPorts == 0 ) {
-    if ( isInput )
-      std::cout << "No input ports available!" << std::endl;
-    else
-      std::cout << "No output ports available!" << std::endl;
-    return false;
-  }
-
-  if ( nPorts == 1 ) {
-    std::cout << "\nOpening " << rtmidi->getPortName() << std::endl;
-  }
-  else {
-    for ( i=0; i<nPorts; i++ ) {
-      portName = rtmidi->getPortName(i);
-      if ( isInput )
-        std::cout << "  Input port #" << i << ": " << portName << '\n';
-      else
-        std::cout << "  Output port #" << i << ": " << portName << '\n';
-    }
-
-    do {
-      std::cout << "\nChoose a port number: ";
-      std::cin >> i;
-    } while ( i >= nPorts );
-  }
-
-  std::cout << std::endl;
-  rtmidi->openPort( i );
-
-  return true;
-}

+ 0 - 110
tests/sysextest.dsp

@@ -1,110 +0,0 @@
-# Microsoft Developer Studio Project File - Name="sysextest" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=sysextest - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "sysextest.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "sysextest.mak" CFG="sysextest - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "sysextest - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "sysextest - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "sysextest - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "sysextest___Win32_Release"
-# PROP BASE Intermediate_Dir "sysextest___Win32_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GR /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "sysextest - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "sysextest___Win32_Debug"
-# PROP BASE Intermediate_Dir "sysextest___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "sysextest - Win32 Release"
-# Name "sysextest - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\RtMidi.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\sysextest.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\RtMidi.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project