mozilla / cubeb

Cross platform audio library
ISC License
439 stars 124 forks source link

Make the log callback and level atomic #724

Closed padenot closed 1 year ago

padenot commented 1 year ago

It's useful to be able to enable logging dynamically while the program is running, and this can now be done on any thread.

Various threads are logging (directly or asynchronously via the ring buffer), it's better to have those atomic.

Both values are always checked before logging, and both must be non-null to log.