1
0
mirror of https://github.com/dolphin-emu/dolphin synced 2024-07-01 07:54:33 +00:00

AudioCommon: unlock mutex explicitly to avoid -Wunused-result warning

This commit is contained in:
Tillmann Karras 2024-05-25 02:19:40 +01:00
parent 0cc1d4c62d
commit 1d8b1715ab

View File

@ -20,7 +20,7 @@ AlsaSound::~AlsaSound()
m_thread_status.store(ALSAThreadStatus::STOPPING);
// Immediately lock and unlock mutex to prevent cv race.
std::unique_lock<std::mutex>{cv_m};
std::unique_lock<std::mutex>{cv_m}.unlock();
// Give the opportunity to the audio thread
// to realize we are stopping the emulation
@ -82,7 +82,7 @@ bool AlsaSound::SetRunning(bool running)
m_thread_status.store(running ? ALSAThreadStatus::RUNNING : ALSAThreadStatus::PAUSED);
// Immediately lock and unlock mutex to prevent cv race.
std::unique_lock<std::mutex>{cv_m};
std::unique_lock<std::mutex>{cv_m}.unlock();
// Notify thread that status has changed
cv.notify_one();