diff options
author | Wohlstand <admin@wohlnet.ru> | 2016-02-07 06:21:31 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2016-02-07 06:21:31 +0300 |
commit | dc0fc3f95f56fe489b610b5a629b219b305a953a (patch) | |
tree | 35841f159d5d0a24a16cac1a7a12fe9d91f7e207 /src/adlmidi.h | |
parent | 26f5342bb8227f73dbee833f4fbe1cece97154a2 (diff) | |
download | libADLMIDI-dc0fc3f95f56fe489b610b5a629b219b305a953a.tar.gz libADLMIDI-dc0fc3f95f56fe489b610b5a629b219b305a953a.tar.bz2 libADLMIDI-dc0fc3f95f56fe489b610b5a629b219b305a953a.zip |
Changes made in January and February 2016
- Fixed freezing on invalid loop points (instead, ignore them!)
- Optimized output generating
- Instead of 16-bit samples stored into array of 32-bit integers, return true PCM-16bit for convenience and with no confusion!
Diffstat (limited to 'src/adlmidi.h')
-rw-r--r-- | src/adlmidi.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/adlmidi.h b/src/adlmidi.h index 75ae8a5..7e8bbd6 100644 --- a/src/adlmidi.h +++ b/src/adlmidi.h @@ -47,6 +47,12 @@ struct ADL_MIDIPlayer { double mindelay; double maxdelay; + /*For internal usage*/ + int stored_samples; //num of collected samples + int backup_samples[1024]; //Backup sample storage. + int backup_samples_size; //Backup sample storage. + /*For internal usage*/ + void *adl_midiPlayer; unsigned long PCM_RATE; }; @@ -94,7 +100,7 @@ extern void adl_reset(struct ADL_MIDIPlayer*device); extern void adl_close(struct ADL_MIDIPlayer *device); /*Take a sample buffer*/ -extern int adl_play(struct ADL_MIDIPlayer*device, int sampleCount, int out []); +extern int adl_play(struct ADL_MIDIPlayer*device, int sampleCount, short out[]); #ifdef __cplusplus } |