Reply 20 of 30, by awgamer
Um, different animal, one is threading, the other I just put the guts of mixer_mix into mixer_callback, calling mixer_callback from mixer_mix, which seemingly produced a slight improvement, but doesn't mesh with the threading.
Attached is threaded mixer_mix diff using sdl_delay and put back sdl_lock/unlockaudio.
jmarch, I've added locking to capturing in hardware.cpp, untested, need a puke condition to verify locks work preventing said puking.
Solve the dac bug and play nice adding thread shutdown wherever dosbox shuts itself down would complete the patch I think, like to see what load threaded mixer_mix gives going over it with profiling like latalante did for the nonthreaded goofyness, thanks for that, BTW. At least with it threaded there's lots of room to add audio post processing or heavier emulation without impacting performance.