jpcima / ADLplug

FM Chip Synthesizer — OPL & OPN — VST/LV2/Standalone
Boost Software License 1.0
426 stars 22 forks source link

Dynamic measurement thread issue #56

Open jpcima opened 5 years ago

jpcima commented 5 years ago

The InitTables method of Dosbox to initialize global data has a defect when using the emulator on multiple threads.

Description of the problem:

Also, there must be a synchronization to ensure correct sequencing of read and write. Mutex will be fine.

(EDIT I don't use several threads in the worker for measuring so it's not affected; but needed for libADLMIDI's genadldata and I'll copy the changes here)