Ver código fonte

ALSA TIME TICK update and documentation updates for RtMidiError class.

Gary Scavone 11 anos atrás
pai
commit
e70222f6a0
3 arquivos alterados com 31 adições e 19 exclusões
  1. 5 1
      RtMidi.cpp
  2. 16 14
      doc/doxygen/tutorial.txt
  3. 10 4
      doc/release.txt

+ 5 - 1
RtMidi.cpp

@@ -1176,7 +1176,11 @@ static void *alsaMidiHandler( void *ptr )
       if ( !( data->ignoreFlags & 0x02 ) ) doDecode = true;
       break;
 
-    case SND_SEQ_EVENT_CLOCK: // MIDI timing tick
+    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;
 

+ 16 - 14
doc/doxygen/tutorial.txt

@@ -17,17 +17,19 @@ Where applicable, multiple API support can be compiled and a particular API spec
 
 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.0)
+\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.
 
 No incompatable API changes were made in version 2.0, however, support for multiple compiled APIs (where available) was added (see \ref multi).  Other changes include: 1. Added Windows Kernel Streaming support (thanks to Sebastien Alaiwan), though not tested in Visual Studio (and timestamping is not implemented); and 2. Support for the IRIX (SGI) operating system was discontinued.
 
 \section download Download
 
-Latest Release (26 July 2012): <A href="http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-2.0.1.tar.gz">Version 2.0.1</A>
+Latest Release (?? January 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 RtError 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:
+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
 
@@ -41,7 +43,7 @@ int main()
   try {
     midiin = new RtMidiIn();
   }
-  catch (RtError &error) {
+  catch (RtMidiError &error) {
     // Handle the exception here
     error.printMessage();
   }
@@ -56,10 +58,10 @@ Obviously, this example doesn't demonstrate any of the real functionality of RtM
 
 \section error Error Handling
 
-RtMidi uses a C++ exception handler called RtError, which is declared
-and defined in RtError.h.  The RtError class is quite simple but it
-does allow errors to be "caught" by RtError::Type.  Many RtMidi
-methods can "throw" an RtError, most typically if a driver error
+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.  There is a protected RtMidi method,
@@ -68,7 +70,7 @@ are handled and reported.  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
-RtError::printMessage() function.
+RtMidiError::printMessage() function.
 
 
 \section probing Probing Ports
@@ -91,7 +93,7 @@ int main()
   try {
     midiin = new RtMidiIn();
   }
-  catch ( RtError &error ) {
+  catch ( RtMidiError &error ) {
     error.printMessage();
     exit( EXIT_FAILURE );
   }
@@ -104,7 +106,7 @@ int main()
     try {
       portName = midiin->getPortName(i);
     }
-    catch ( RtError &error ) {
+    catch ( RtMidiError &error ) {
       error.printMessage();
       goto cleanup;
     }
@@ -115,7 +117,7 @@ int main()
   try {
     midiout = new RtMidiOut();
   }
-  catch ( RtError &error ) {
+  catch ( RtMidiError &error ) {
     error.printMessage();
     exit( EXIT_FAILURE );
   }
@@ -127,7 +129,7 @@ int main()
     try {
       portName = midiout->getPortName(i);
     }
-    catch (RtError &error) {
+    catch (RtMidiError &error) {
       error.printMessage();
       goto cleanup;
     }
@@ -385,7 +387,7 @@ In order to compile RtMidi for a specific OS and API, it is necessary to supply
 </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>, <tt>RtError.h</tt>, and <TT>RtMidi.cpp</TT> all exist in the same directory.
+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
 

+ 10 - 4
doc/release.txt

@@ -1,9 +1,15 @@
-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).
+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-2012
+By Gary P. Scavone, 2003-2014
 
-v2.0.2: (?? 2014)
+v2.1.0: (?? 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)
 
 v2.0.1: (26 July 2012)
 - small fixes for problems reported by Chris Arndt (scoping, preprocessor, and include)
@@ -14,7 +20,7 @@ v2.0.0: (18 June 2012)
 - 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
+- various memory-leak fixes (thanks to Sebastien Alaiwan and Martin Koegler)
 - fix for continue sysex problem (thanks to Luc Deschenaux)
 - removed SGI (IRIX) support