improved mutex locking - less xruns when seeking

especially in JACK and macOS
This commit is contained in:
tildearrow 2022-03-23 21:38:28 -05:00
parent 11d9ce3f87
commit 711b60d454
5 changed files with 147 additions and 134 deletions

View file

@ -38,6 +38,10 @@
warnings+=(String("\n")+x); \
}
#define BUSY_BEGIN softLocked=false; isBusy.lock();
#define BUSY_BEGIN_SOFT softLocked=true; isBusy.lock();
#define BUSY_END isBusy.unlock(); softLocked=false;
#define DIV_VERSION "dev70"
#define DIV_ENGINE_VERSION 70
@ -185,6 +189,7 @@ class DivEngine {
bool halted;
bool forceMono;
bool cmdStreamEnabled;
bool softLocked;
int ticks, curRow, curOrder, remainingLoops, nextSpeed;
double divider;
int cycles;