dolphin/Source/Core
Léo Lam 7c46497f04 Fix a race condition when shutting down audio stream
The main EmuThread (in Core) is responsible for both initialising the
audio stream and shutting it down properly.

When the core is shutting down (when state is State::PowerDown), it is
possible that the CPU or CPU-GPU thread and the UI thread will both
try to stop the audio stream at the same time, which is an issue
because some audio backends such as cubeb are not thread-safe.

This commit prevents the race from ever happening in the first place
by removing the call to AudioCommon::SetSoundStreamRunning from
CPU::RunAdjacentSystems, which is actually completely unnecessary when
shutting down because Core::EmuThread is going to stop the stream and
perform more cleanup anyway.

Should fix https://bugs.dolphin-emu.org/issues/11722
2019-05-11 16:36:42 +02:00
..
AudioCommon Set Cubeb as default on Windows 2019-05-11 14:22:03 +02:00
Common TraversalServer: use C++ <chrono> instead of gettimeofday 2019-05-10 21:33:26 +02:00
Core Fix a race condition when shutting down audio stream 2019-05-11 16:36:42 +02:00
DiscIO Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
DolphinNoGUI Config: Move the 'Display' settings from ConfigManager to the layered config system 2019-03-30 18:43:02 -05:00
DolphinQt Merge pull request #8088 from Pokechu22/modal-control-mapping 2019-05-11 10:45:28 +02:00
InputCommon WiimoteEmu/DolphinQt: Rename "IR" to "Point" and eliminate redundant Forward/Backward mappings. 2019-05-08 20:27:41 -05:00
MacUpdater Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
UICommon Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
UpdaterCommon UpdaterCommon: Move most of the programs here 2019-03-03 15:02:44 +01:00
VideoBackends bbox minor fx 2019-05-09 17:30:17 +08:00
VideoCommon CommandProcessor: Don't reset the video buffer when FIFO distance is changed 2019-05-11 00:31:37 +10:00
WinUpdater WinUpdater: Restore original executable name 2019-04-11 20:21:50 +02:00
CMakeLists.txt Move shared Updater logic into UpdaterCommon 2019-02-26 19:27:36 +01:00