diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-11-07 01:12:01 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-11-07 01:12:01 +0300 |
commit | 22350acc1f699f70cbdac6b5facadd0d6ccc8a7f (patch) | |
tree | fe8f64c337d484f723af25c20fe1e0d264e39e5c /include/adlmidi.h | |
parent | c71f0d4dfe52a523b37416717299700e203f818d (diff) | |
download | libADLMIDI-22350acc1f699f70cbdac6b5facadd0d6ccc8a7f.tar.gz libADLMIDI-22350acc1f699f70cbdac6b5facadd0d6ccc8a7f.tar.bz2 libADLMIDI-22350acc1f699f70cbdac6b5facadd0d6ccc8a7f.zip |
New API, classic ADLMIDI, and CMake
- Attempt to support hardware OPL and add build of classic ADLMIDI into CMake
- Added new API functions
- Added C++ Extras are needed for classic ADLMIDI player
- Error string is no more static. Static variant is kept for initialization errors only.
Diffstat (limited to 'include/adlmidi.h')
-rw-r--r-- | include/adlmidi.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/adlmidi.h b/include/adlmidi.h index 24fa4c9..1073721 100644 --- a/include/adlmidi.h +++ b/include/adlmidi.h @@ -104,9 +104,15 @@ extern int adl_openBankData(struct ADL_MIDIPlayer *device, void *mem, long size) /*Returns name of currently used OPL3 emulator*/ extern const char *adl_emulatorName(); -/*Returns string which contains last error message*/ +/*Returns string which contains a version number*/ +extern const char *adl_linkedLibraryVersion(); + +/*Returns string which contains last error message of initialization*/ extern const char *adl_errorString(); +/*Returns string which contains last error message on specific device*/ +extern const char *adl_errorInfo(ADL_MIDIPlayer *device); + /*Initialize ADLMIDI Player device*/ extern struct ADL_MIDIPlayer *adl_init(long sample_rate); @@ -181,6 +187,18 @@ extern int adl_play(struct ADL_MIDIPlayer *device, int sampleCount, short out[] /*Generate audio output from chip emulators without iteration of MIDI timers. 512 samples per channel is a maximum*/ extern int adl_generate(ADL_MIDIPlayer *device, int sampleCount, short *out); +/** + * @brief Periodic tick handler. + * @param device + * @param seconds seconds since last call + * @param granularity don't expect intervals smaller than this, in seconds + * @return desired number of seconds until next call + * + * Use it for Hardware OPL3 mode or when you want to process events differently from adl_play() function. + * DON'T USE IT TOGETHER WITH adl_play()!!! + */ +extern double adl_tickEvents(ADL_MIDIPlayer *device, double seconds, double granuality); + /**Hooks**/ typedef void (*ADL_RawEventHook)(void *userdata, ADL_UInt8 type, ADL_UInt8 subtype, ADL_UInt8 channel, ADL_UInt8 *data, size_t len); |