summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/AlsaSoundStream.cpp
AgeCommit message (Collapse)Author
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2015-10-03ALSA: Don't block on Clear() call.Scott Mansell
snd_pcm_writei() is meant to block block until all samples are written, but apparently in some situations it can block for much longer, prehaps even a infinite time, in the case of virtual machine FifoCI runs in. Because it grabed a mutex before blocking, it could also block the Clear() call for an infinite length of time, blocking dolphin's emu thread. snd_pcm_writei() also takes 10-15 seconds if you run dolphin under GDB and can randomly take 5 or so seconds during normal usage. By moving all the pause code to the ALSA thread, Clear() no-longer blocks and everyone keeps their sanity.
2015-09-30AlsaSound: fix buffer type, clean up macrosbooto
2015-09-26Common: Remove other Common prefixed headers from Common.hLioncash
2015-08-11Don't busy wait in the audio thread (ALSA)Moncef Mechri
When the emulation is paused and the ALSA backend is used, make the audio thread wait on a condition variable instead of busy-waiting. This commit fixes bug #7729 Since the ALSA API is not thread-safe, calls to snd_pcm_drop() and snd_pcm_prepare() in AlsaSound::Clear() are protected by the same mutex as the condition variable in AlsaSound::SoundLoop() to make sure that we do not call these functions while a call to snd_pcm_writei() is ongoing.
2015-08-11Initialize ALSA before starting the audio threadMoncef Mechri
This fixes a race condition: Before this commit, there was a race condition when starting a game: Core::EmuThread(), after having started (but not necessarily completed) the initialization of the audio thread, calls Core::SetState() which calls CCPU::EnableStepping(), which in turns calls AudioCommon::ClearAudioBuffer(). This means that SoundStream::Clear() can be called before AlsaSound::AlsaInit() has completed.
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-24SoundStream: Internally construct the mixerLioncash
Instead of creating the mixer externally and then passing it in, it can just be made within the class.
2015-05-11AlsaSoundStream: Use an enum class for signifying ALSA thread stateLioncash
2015-05-11AlsaSoundStream: Convert volatile variables to atomicsLioncash
2014-09-10Merge pull request #1027 from rohit-n/change-includeRyan Houdek
Include CommonTypes.h instead of Common.h.
2014-09-08Include CommonTypes.h instead of Common.h.Rohit Nirmal
2014-09-08AudioCommon: Remove unnecessary usages of mem_fnLioncash
2014-04-01Replace use of the deprecated mem_fun function with mem_fn.lioncash
2014-03-09clang-modernize -use-nullptrTillmann Karras
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-02-18Convert all includes to relative paths.Lioncash
2013-12-31Remove unnecessary Src/ foldersJasper St. Pierre