(this was originally reported as https://bugs.debian.org/#761307)
I see you wrote on http://comments.gmane.org/gmane.comp.audio.libsndfile.devel/564
"SNDFILE handles should not be accessed by multiple threads unless
you have a locking mechanism around all uses of the handle.
However, it is possible to open multiple SNDFILE handles to the
same underlying file and operate on them accross multiple
threads."
This would be fine, but there are some global/static variables which break thread-safety. So far I found sf_errno, sf_logbuffer, sf_syserr which apparently are used only during opening, including sf_strerror(NULL) and sf_command(NULL, SFC_GET_LOG_INFO, ...).
So I conclude opening even different sound files concurrently is not thread-safe!
(this was originally reported as https://bugs.debian.org/#761307)
I see you wrote on http://comments.gmane.org/gmane.comp.audio.libsndfile.devel/564
This would be fine, but there are some global/static variables which break thread-safety. So far I found
sf_errno,sf_logbuffer,sf_syserrwhich apparently are used only during opening, includingsf_strerror(NULL)andsf_command(NULL, SFC_GET_LOG_INFO, ...).So I conclude opening even different sound files concurrently is not thread-safe!