Audio/Music: Fix datarace

This commit is contained in:
SirLynix
2022-06-07 20:18:26 +02:00
parent c7b6d83bbc
commit 16922a9519
2 changed files with 9 additions and 7 deletions

View File

@@ -63,7 +63,7 @@ namespace Nz
AudioFormat m_audioFormat;
std::atomic_bool m_streaming;
std::atomic<UInt64> m_processedSamples;
mutable std::mutex m_bufferLock;
mutable std::recursive_mutex m_sourceLock;
std::size_t m_bufferCount;
std::shared_ptr<SoundStream> m_stream;
std::thread m_thread;