Skip to content

Commit

Permalink
Merge pull request #312 from jbarrett/rtmidi_get_version
Browse files Browse the repository at this point in the history
Add rtmidi_get_version() to C API
  • Loading branch information
garyscavone committed Jun 15, 2023
2 parents fd7c12a + 7723503 commit 1a9d348
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rtmidi_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ class CallbackProxyUserData
extern "C" const unsigned int rtmidi_num_compiled_apis;

/* RtMidi API */
const char* rtmidi_get_version()
{
return RTMIDI_VERSION;
}

int rtmidi_get_compiled_api (enum RtMidiApi *apis, unsigned int apis_size)
{
unsigned num = rtmidi_num_compiled_apis;
Expand Down
5 changes: 5 additions & 0 deletions rtmidi_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ typedef void(* RtMidiCCallback) (double timeStamp, const unsigned char* message,

/* RtMidi API */

/*! \brief Return the current RtMidi version.
*! See \ref RtMidi::getVersion().
*/
RTMIDIAPI const char* rtmidi_get_version();

/*! \brief Determine the available compiled MIDI APIs.
*
* If the given `apis` parameter is null, returns the number of available APIs.
Expand Down

0 comments on commit 1a9d348

Please sign in to comment.