diff options
author | Wohlstand <admin@wohlnet.ru> | 2022-06-29 18:27:00 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2022-06-29 18:27:00 +0300 |
commit | 48ec16f3d2a04295767b6bac38aed7bef5180881 (patch) | |
tree | 2812d6d55fc8547ef349a0f60cf07a2401b202e9 /include | |
parent | 219d03678d35cc8667490e2eae38b58e354347d3 (diff) | |
download | libADLMIDI-48ec16f3d2a04295767b6bac38aed7bef5180881.tar.gz libADLMIDI-48ec16f3d2a04295767b6bac38aed7bef5180881.tar.bz2 libADLMIDI-48ec16f3d2a04295767b6bac38aed7bef5180881.zip |
Added the chip channels allocation mode option
Diffstat (limited to 'include')
-rw-r--r-- | include/adlmidi.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/include/adlmidi.h b/include/adlmidi.h index 71a67c7..9cf53a8 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -125,7 +125,26 @@ enum ADLMIDI_VolumeModels /*! HMI Sound Operating System volume scaling model */ ADLMIDI_VolumeModel_HMI = 10, /*! HMI Sound Operating System volume scaling model, older variant with bugs */ - ADLMIDI_VolumeModel_HMI_OLD = 11 + ADLMIDI_VolumeModel_HMI_OLD = 11, + /*! Count of available volume model modes */ + ADLMIDI_VolumeModel_Count +}; + +/*! + * \brief Algorithms of channel allocation for new notes + */ +enum ADLMIDI_ChannelAlloc +{ + /*! Automatical choise of the method according to the volume model and internal preferrences */ + ADLMIDI_ChanAlloc_AUTO = -1, + /*! Take only channels that has expired sounding delay */ + ADLMIDI_ChanAlloc_OffDelay, + /*! Take any first released channel with the same instrument */ + ADLMIDI_ChanAlloc_SameInst, + /*! Take any first released channel */ + ADLMIDI_ChanAlloc_AnyReleased, + /*! Count of available channel allocation modes */ + ADLMIDI_ChanAlloc_Count }; /** @@ -610,6 +629,20 @@ extern ADLMIDI_DECLSPEC void adl_setVolumeRangeModel(struct ADL_MIDIPlayer *devi extern ADLMIDI_DECLSPEC int adl_getVolumeRangeModel(struct ADL_MIDIPlayer *device); /** + * @brief Set the channel allocation mode + * @param device Instance of the library + * @param chanalloc Channel allocation mode (#ADLMIDI_ChannelAlloc) + */ +extern ADLMIDI_DECLSPEC void adl_setChannelAllocMode(struct ADL_MIDIPlayer *device, int chanalloc); + +/** + * @brief Get the current channel allocation mode + * @param device Instance of the library + * @return Channel allocation mode (#ADLMIDI_ChannelAlloc) + */ +extern ADLMIDI_DECLSPEC int adl_getChannelAllocMode(struct ADL_MIDIPlayer *device); + +/** * @brief Load WOPL bank file from File System * * Is recommended to call adl_reset() to apply changes to already-loaded file player or real-time. |