summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon
AgeCommit message (Collapse)Author
2016-05-13Core: Threadsafety Synchronization Fixes (Frame Advance / FifoPlayer)EmptyChaos
Fix Frame Advance and FifoPlayer pause/unpause/stop. CPU::EnableStepping is not atomic but is called from multiple threads which races and leaves the system in a random state; also instruction stepping was unstable, m_StepEvent had an almost random value because of the dual purpose it served which could cause races where CPU::Run would SingleStep when it was supposed to be sleeping. FifoPlayer never FinishStateMove()d which was causing it to deadlock. Rather than partially reimplementing CPU::Run, just use CPUCoreBase and then call CPU::Run(). More DRY and less likely to have weird bugs specific to the player (i.e the previous freezing on pause/stop). Refactor PowerPC::state into CPU since it manages the state of the CPU Thread which is controlled by CPU, not PowerPC. This simplifies the architecture somewhat and eliminates races that can be caused by calling PowerPC state functions directly instead of using CPU's (because they bypassed the EnableStepping lock).
2016-02-07Merge pull request #3602 from OatmealDome/coreaudioMathew Maidment
CoreAudioSound: Minor clean up
2016-02-06CoreAudioSound: Replace deprecated parametersOatmealDome
The kAudioUnitParameterFlag_* parameters don't exist on iOS.
2016-02-06CoreAudioSound: Only include AudioUnitOatmealDome
2016-02-05CMakeLists cleanup and enable Android headless building.Ryan Houdek
2016-01-15Mixer: Convert defines into concrete variablesLioncash
Gets defines out of global scope.
2016-01-14Mixer: Directly initialize class membersLioncash
2016-01-14Mixer: DevirtualizeLioncash
Nothing in the codebase inherits from this class
2016-01-05Throttler: Rename "framelimiter" to "emulation speed".degasus
We don't throttle by frames, we throttle by coretiming speed. So looking up VI for calculating the speed was just very wrong. The new ini option is a float, 1.0f for fullspeed. In the GUI, percentual values are used.
2016-01-03[OpenSLES] Fix a delay in audio processing.Ryan Houdek
A failure on my part. I was updating the two buffers in the wrong order, so we were always a buffer behind in sending audio out to OpenSLES.
2015-12-28Updated SoundTouch library to 1.9.2skidau
2015-12-15Merge pull request #3317 from lioncash/nullMarkus Wick
NullSound: Minor changes
2015-12-11Merge pull request #3200 from degasus/masterRyan Houdek
Throttler + Mixer: Configureable variance
2015-12-05NullSound: Use std::array for the bufferLioncash
2015-12-05NullSound: Replace header define with private constantLioncash
2015-12-02WaveFile: Get rid of an explicit deleteLioncash
2015-11-03Throttler + Mixer: Configureable variancedegasus
2015-10-03Merge pull request #3105 from phire/dont_blockshuffle2
ALSA: Don't block on Clear() call.
2015-10-03Merge pull request #3102 from rohit-n/build-pchLioncash
Fix building with PCH disabled.
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-10-02Alsa: Silence -Wsign-compare warning.Rohit Nirmal
2015-09-30AlsaSound: fix buffer type, clean up macrosbooto
2015-09-28Fix building with PCH disabled.Rohit Nirmal
2015-09-26Common: Remove other Common prefixed headers from Common.hLioncash
2015-09-26Common: Move NonCopyable to its own headerLioncash
2015-09-12Merge pull request #3026 from lioncash/constexprRyan Houdek
MathUtil: Make Clamp and IsPow2 constexpr functions.
2015-09-12MathUtil: Convert Clamp into a constexpr functionLioncash
2015-09-11Added X-Fi check and convert surround FLOAT to SHORT when it is detectedLAGonauta
Fixed braces, first try fixing mac compilation and removed useless NULL comparison.
2015-09-03[windows] Update projects to vs2015.Shawn Hoffman
2015-08-15Merge pull request #2854 from Tilka/valgrindMarkus Wick
Fix some small stuff found with Valgrind
2015-08-15Merge pull request #2676 from Stevoisiak/SpellingCorrectionsMarkus Wick
Minor spelling corrections
2015-08-15PulseAudio: fix small memleakTillmann Karras
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-08-10Merge pull request #2825 from lioncash/logMarkus Wick
AudioCommon: Log to AUDIO, not DSPHLE
2015-08-10Use dummy audio backend if the selected backend fails to startMoncef Mechri
If the selected audio backend fails to Start() (which could happen for example if there is no audio device), we currently still use the backend anyway. This can lead to crashes on some platforms (such as Windows) and is outright wrong anyway. This commit fallbacks to the Null audio backend if the selected backend couldn't be started. This fixes bug #6001
2015-08-09AudioCommon: Remove unused code from XAudio streamsLioncash
2015-08-09AudioCommon: Log to AUDIO, not DSPHLELioncash
This code is not related to DSPHLE.
2015-07-30Remove unnecessary virtual keywordsLioncash
2015-06-29Minor spelling correctionsStevoisiak
2015-06-27Merge pull request #2659 from Armada651/openal-convJules Blok
OpenALStream: Fix sample conversion.
2015-06-25OpenALStream: Fix sample conversion.Jules Blok
Looks like it wasn't symmetric anymore.
2015-06-20Mixer: Fix erroneous global prefixes on class variablesLioncash
2015-06-20Mixer: Devirtualize DTK and DSP audio logging functionsLioncash
Their functionality is already complete in the base class; there's no need to allow overriding.
2015-06-12Options: merge SCoreStartupParameter into SConfigdegasus
2015-06-04Use PanicAlert instead of PanicAlertT when appropriateJosJuice
It means less work for the translators... But I'm not too sure about this, because most of these have already been translated.
2015-05-28AudioCommon: Remove lock on Pause statedegasus
We had to lock audiocommon with the old asynchron HLE audio emulation, now our Mixer is just a plain FIFO which may underrun. Of course, this will stutter, but underruning the audio backend is likely worse.
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-25Add missing license headersTillmann Karras