Audio: Fix data race when a device is used from multiple threads

OpenAL devices can be used from multiple threads and the error handling code (inspired by OpenGLRenderer) did not take that into account. This is not a problem for the OpenGLRenderer since contexts are thread-local which is not the case for OpenAL devices.
This commit is contained in:
SirLynix
2023-12-04 11:01:01 +01:00
parent 81c5322331
commit b5576ccb9f
3 changed files with 2 additions and 22 deletions

View File

@@ -7,14 +7,6 @@
namespace Nz
{
inline bool OpenALDevice::DidLastCallSucceed() const
{
if (!m_didCollectErrors)
ProcessErrorFlag();
return !m_hadAnyError;
}
inline ALFunction OpenALDevice::GetFunctionByIndex(std::size_t funcIndex) const
{
assert(funcIndex < m_originalFunctionPointer.size());