Merge branch 'master' into feature/Moar-patch-bank-support-part3

This commit is contained in:
James Alan Nguyen 2022-05-15 16:49:52 +10:00
commit 0e07b745c7
28 changed files with 1206 additions and 611 deletions

View file

@ -45,8 +45,8 @@
#define BUSY_BEGIN_SOFT softLocked=true; isBusy.lock();
#define BUSY_END isBusy.unlock(); softLocked=false;
#define DIV_VERSION "dev94"
#define DIV_ENGINE_VERSION 94
#define DIV_VERSION "dev95"
#define DIV_ENGINE_VERSION 95
// for imports
#define DIV_VERSION_MOD 0xff01
@ -304,6 +304,7 @@ class DivEngine {
bool hasLoadedSomething;
int softLockCount;
int subticks, ticks, curRow, curOrder, remainingLoops, nextSpeed;
size_t curSubSongIndex;
double divider;
int cycles;
double clockDrift;
@ -414,8 +415,14 @@ class DivEngine {
void swapChannels(int src, int dest);
void stompChannel(int ch);
// change song (UNSAFE)
void changeSong(size_t songIndex);
public:
DivSong song;
DivOrders* curOrders;
DivChannelData* curPat;
DivSubSong* curSubSong;
DivInstrument* tempIns;
DivSystem sysOfChan[DIV_MAX_CHANS];
int dispatchOfChan[DIV_MAX_CHANS];
@ -606,6 +613,9 @@ class DivEngine {
// get current row
int getRow();
// get current subsong
size_t getCurrentSubSong();
// get speed 1
unsigned char getSpeed1();
@ -802,6 +812,15 @@ class DivEngine {
// public swap channels
void swapChannelsP(int src, int dest);
// public change song
void changeSongP(size_t index);
// add subsong
int addSubSong();
// remove subsong
bool removeSubSong(int index);
// change system
void changeSystem(int index, DivSystem which, bool preserveOrder=true);
@ -903,6 +922,7 @@ class DivEngine {
curOrder(0),
remainingLoops(-1),
nextSpeed(3),
curSubSongIndex(0),
divider(60),
cycles(0),
clockDrift(0),
@ -938,6 +958,8 @@ class DivEngine {
metroAmp(0.0f),
metroVol(1.0f),
totalProcessed(0),
curOrders(NULL),
curPat(NULL),
tempIns(NULL),
oscBuf{NULL,NULL},
oscSize(1),
@ -962,6 +984,8 @@ class DivEngine {
sysFileMapFur[i]=DIV_SYSTEM_NULL;
sysFileMapDMF[i]=DIV_SYSTEM_NULL;
}
changeSong(0);
}
};
#endif