From dc0fc3f95f56fe489b610b5a629b219b305a953a Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Sun, 7 Feb 2016 06:21:31 +0300 Subject: 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! --- src/adlmidi.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/adlmidi.h') 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 } -- cgit v1.2.3