wasapi: Make debug logging thread-safe, handle errors during render thread shutdown.
wasapi: Make debug logging thread-safe, handle errors during render thread shutdown.

kinetiknz/cubeb,padenot/cubeb,kinetiknz/cubeb,ieei/cubeb,padenot/cubeb,ieei/cubeb,kinetiknz/cubeb,padenot/cubeb