New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AudioCommon: Remove usages of volatile variables. #2387
Conversation
This is only ever used in these two sound streams. Seems silly to have it as a class member. Converted it to an atomic as well.
@@ -39,7 +41,7 @@ class AlsaSound final : public SoundStream | |||
// 0 = continue | |||
// 1 = shutdown | |||
// 2 = done shutting down. | |||
volatile int thread_data; | |||
std::atomic<int> thread_data; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@comex: Addressed in the recent-most commit. |
@@ -19,6 +20,7 @@ class AOSound final : public SoundStream | |||
{ | |||
#if defined(HAVE_AO) && HAVE_AO | |||
std::thread thread; | |||
std::atomic<bool> m_run_thread; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
AudioCommon: Remove usages of volatile variables.
Converts them over to using atomics.