From 37fe0cba52ce49977839eb7703ce6d7a42239a06 Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Sun, 21 Jan 2018 06:49:51 +0300 Subject: Move version number into the public header --- include/adlmidi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include/adlmidi.h') diff --git a/include/adlmidi.h b/include/adlmidi.h index 25691da..e3554a1 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -28,6 +28,17 @@ extern "C" { #endif +#define ADLMIDI_VERSION_MAJOR 1 +#define ADLMIDI_VERSION_MINOR 3 +#define ADLMIDI_VERSION_PATCHLEVEL 1 + +#define ADLMIDI_TOSTR(s) #s +#define ADLMIDI_VERSION \ + ADLMIDI_TOSTR(OPNMIDI_VERSION_MAJOR) "." \ + ADLMIDI_TOSTR(OPNMIDI_VERSION_MINOR) "." \ + ADLMIDI_TOSTR(OPNMIDI_VERSION_PATCHLEVEL) + + #include #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) @@ -117,9 +128,18 @@ extern int adl_openBankData(struct ADL_MIDIPlayer *device, const void *mem, unsi /*Returns name of currently used OPL3 emulator*/ extern const char *adl_emulatorName(); +typedef struct { + ADL_UInt16 major; + ADL_UInt16 minor; + ADL_UInt16 patch; +} ADL_Version; + /*Returns string which contains a version number*/ extern const char *adl_linkedLibraryVersion(); +/*Returns structure which contains a version number of library */ +extern const ADL_Version *adl_linkedVersion(); + /*Returns string which contains last error message of initialization*/ extern const char *adl_errorString(); -- cgit v1.2.3