Various audio engine and threading fixes and prep-work for future plans,
but it needs a lot of testing...