more multi-thread fixes

don't use static on acquire()
don't yield at all
run fillBuf() on thread
fix option tooltip as it introduces some overhead
This commit is contained in:
tildearrow 2023-09-07 00:48:26 -05:00
parent 64669e4d9b
commit 1a520dbf3e
14 changed files with 33 additions and 29 deletions

View file

@ -165,8 +165,8 @@ void DivPlatformYM2203::acquire(short** buf, size_t len) {
}
void DivPlatformYM2203::acquire_combo(short** buf, size_t len) {
static int os;
static short ignored[2];
thread_local int os;
thread_local short ignored[2];
for (size_t h=0; h<len; h++) {
// AY -> OPN
@ -241,7 +241,7 @@ void DivPlatformYM2203::acquire_combo(short** buf, size_t len) {
}
void DivPlatformYM2203::acquire_ymfm(short** buf, size_t len) {
static int os;
thread_local int os;
ymfm::ym2203::fm_engine* fme=fm->debug_fm_engine();