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

@ -477,7 +477,7 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop) {
stop();
repeatPattern=false;
setOrder(0);
isBusy.lock();
BUSY_BEGIN_SOFT;
double origRate=got.rate;
got.rate=44100;
// determine loop point
@ -1305,6 +1305,6 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop) {
logI("%d register writes total.\n",writeCount);
isBusy.unlock();
BUSY_END;
return w;
}