In miniaudio they used to add volatile
to indicate that a variable can be changed by multiple threads but they removed it, change log "Add the MA_ATOMIC annotation for use with variables that should be used atomically and remove unnecessary volatile qualifiers."
They added a #define MA_ATOMIC
that does nothing instead of using volatile
. Why isn't the volatile qualifier necessary?
The repo: https://github.com/mackron/miniaudio