Merge branch 'master' into ZSMv1

This commit is contained in:
ZeroByteOrg 2022-06-06 09:44:57 -05:00
commit 378f6a957b
3651 changed files with 495554 additions and 653 deletions

View file

@ -303,7 +303,7 @@ class DivEngine {
bool systemsRegistered;
bool hasLoadedSomething;
int softLockCount;
int subticks, ticks, curRow, curOrder, remainingLoops, nextSpeed;
int subticks, ticks, curRow, curOrder, prevRow, prevOrder, remainingLoops, totalLoops, lastLoopPos, exportLoopCount, nextSpeed;
size_t curSubSongIndex;
double divider;
int cycles;
@ -318,6 +318,7 @@ class DivEngine {
DivChannelState chan[DIV_MAX_CHANS];
DivAudioEngines audioEngine;
DivAudioExportModes exportMode;
double exportFadeOut;
std::map<String,String> conf;
std::queue<DivNoteEvent> pendingNotes;
bool isMuted[DIV_MAX_CHANS];
@ -339,16 +340,20 @@ class DivEngine {
int sample;
int wave;
unsigned int pos;
int pBegin, pEnd;
SamplePreview():
sample(-1),
wave(-1),
pos(0) {}
pos(0),
pBegin(-1),
pEnd(-1) {}
} sPreview;
short vibTable[64];
int reversePitchTable[4096];
int pitchTable[4096];
int midiBaseChan;
bool midiPoly;
size_t midiAgeCounter;
blip_buffer_t* samp_bb;
@ -461,7 +466,7 @@ class DivEngine {
// dump to ZSM.
SafeWriter* saveZSM(unsigned int zsmrate=60, bool loop=true);
// export to an audio file
bool saveAudio(const char* path, int loops, DivAudioExportModes mode);
bool saveAudio(const char* path, int loops, DivAudioExportModes mode, double fadeOutTime=0.0);
// wait for audio export to finish
void waitAudioFile();
// stop audio file export
@ -527,7 +532,7 @@ class DivEngine {
void syncReset();
// trigger sample preview
void previewSample(int sample, int note=-1);
void previewSample(int sample, int note=-1, int pStart=-1, int pEnd=-1);
void stopSamplePreview();
// trigger wave preview
@ -676,7 +681,7 @@ class DivEngine {
int addWave();
// add wavetable from file
bool addWaveFromFile(const char* path);
bool addWaveFromFile(const char* path, bool loadRaw=true);
// delete wavetable
void delWave(int index);
@ -724,6 +729,9 @@ class DivEngine {
void autoNoteOn(int chan, int ins, int note, int vol=-1);
void autoNoteOff(int chan, int note, int vol=-1);
void autoNoteOffAll();
// set whether autoNoteIn is mono or poly
void setAutoNotePoly(bool poly);
// go to order
void setOrder(unsigned char order);
@ -824,6 +832,10 @@ class DivEngine {
// remove subsong
bool removeSubSong(int index);
// move subsong
void moveSubSongUp(size_t index);
void moveSubSongDown(size_t index);
// clear all subsong data
void clearSubSongs();
@ -926,7 +938,12 @@ class DivEngine {
ticks(0),
curRow(0),
curOrder(0),
prevRow(0),
prevOrder(0),
remainingLoops(-1),
totalLoops(0),
lastLoopPos(0),
exportLoopCount(0),
nextSpeed(3),
curSubSongIndex(0),
divider(60),
@ -950,7 +967,9 @@ class DivEngine {
haltOn(DIV_HALT_NONE),
audioEngine(DIV_AUDIO_NULL),
exportMode(DIV_EXPORT_MODE_ONE),
exportFadeOut(0.0),
midiBaseChan(0),
midiPoly(true),
midiAgeCounter(0),
samp_bb(NULL),
samp_bbInLen(0),