From c971992278519b29768be349dd3962bbd93dbb22 Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Sun, 30 Sep 2018 04:57:56 +0300 Subject: Lock settings for CMF and IMF playing to don't destroy them For now, all settings are in safe, except of custom bank that getting be dropped away by CMF file that does passing of own custom instruments. --- include/adlmidi.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include/adlmidi.h') diff --git a/include/adlmidi.h b/include/adlmidi.h index eb3edf4..2732959 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -184,6 +184,13 @@ extern ADLMIDI_DECLSPEC int adl_setNumChips(struct ADL_MIDIPlayer *device, int n */ extern ADLMIDI_DECLSPEC int adl_getNumChips(struct ADL_MIDIPlayer *device); +/** + * @brief Get obtained number of emulated chips + * @param device Instance of the library + * @return Count of working chip emulators + */ +extern ADLMIDI_DECLSPEC int adl_getNumChipsObtained(struct ADL_MIDIPlayer *device); + /** * @brief Sets a number of the patches bank from 0 to N banks. * @@ -340,10 +347,17 @@ extern ADLMIDI_DECLSPEC int adl_setNumFourOpsChn(struct ADL_MIDIPlayer *device, /** * @brief Get current total count of 4-operator channels between all chips * @param device Instance of the library - * @return 0 on success, <0 when any error has occurred + * @return 0 on success, <-1 when any error has occurred, but, -1 - "auto" */ extern ADLMIDI_DECLSPEC int adl_getNumFourOpsChn(struct ADL_MIDIPlayer *device); +/** + * @brief Get obtained total count of 4-operator channels between all chips + * @param device Instance of the library + * @return 0 on success, <0 when any error has occurred + */ +extern ADLMIDI_DECLSPEC int adl_getNumFourOpsChnObtained(struct ADL_MIDIPlayer *device); + /** * @brief Override Enable(1) or Disable(0) AdLib percussion mode. -1 - use bank default AdLib percussion mode * -- cgit v1.2.3 From eefbc9eb33324e0d0a9f371f0b88ffcce85adb23 Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Sun, 30 Sep 2018 21:54:41 +0300 Subject: Minor fix of the public header --- include/adlmidi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/adlmidi.h') diff --git a/include/adlmidi.h b/include/adlmidi.h index 2732959..4b21e25 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -66,7 +66,7 @@ typedef short ADL_SInt16; #ifdef __clang__ # if __has_extension(attribute_deprecated_with_message) -# define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message))) +# define ADLMIDI_DEPRECATED(message) __attribute__((deprecated(message))) # endif #elif defined __GNUC__ /* not clang (gcc comes later since clang emulates gcc) */ # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) -- cgit v1.2.3 From f78312bef17d096636f7888d44c103b777ce443e Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Mon, 1 Oct 2018 03:53:02 +0300 Subject: Remove useless dllexport from the typedef --- include/adlmidi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/adlmidi.h') diff --git a/include/adlmidi.h b/include/adlmidi.h index 4b21e25..3524587 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -743,7 +743,7 @@ extern ADLMIDI_DECLSPEC int adl_setTrackOptions(struct ADL_MIDIPlayer *device, s * @param trigger Value of the event which triggered this callback. * @param track Identifier of the track which triggered this callback. */ -typedef ADLMIDI_DECLSPEC void (*ADL_TriggerHandler)(void *userData, unsigned trigger, size_t track); +typedef void (*ADL_TriggerHandler)(void *userData, unsigned trigger, size_t track); /** * @brief Defines a handler for callback trigger events -- cgit v1.2.3