aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi.h
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2016-02-07 06:21:31 +0300
committerWohlstand <admin@wohlnet.ru>2016-02-07 06:21:31 +0300
commitdc0fc3f95f56fe489b610b5a629b219b305a953a (patch)
tree35841f159d5d0a24a16cac1a7a12fe9d91f7e207 /src/adlmidi.h
parent26f5342bb8227f73dbee833f4fbe1cece97154a2 (diff)
downloadlibADLMIDI-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.h8
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
}