Commit Graph

26 Commits

Author SHA1 Message Date
Tillmann Karras eda2035874 AudioCommon: rename isValid() to IsValid() 2021-08-08 03:05:03 +01:00
Tillmann Karras b6d8c111bc AudioCommon: make SoundLoop() non-virtual and private 2021-08-08 00:15:05 +01:00
Tillmann Karras d14b9a73b2 AudioCommon: get rid of Update(), it never does anything 2021-08-08 00:14:49 +01:00
Pierre Bourdon e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
spycrab 40bb9974f2 Reformat all the things! 2018-04-12 21:28:39 +02:00
Michael M 0baddbf9a8 SoundStream: change Start/Stop to Init/SetRunning/destruct 2017-11-19 12:09:54 -08:00
Michael M b031d3316c SoundStream: rename Clear(mute) to SetRunning(running) 2017-10-21 16:28:04 -07:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Scott Mansell a10a3ecbac ALSA: Don't block on Clear() call.
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-03 16:31:55 +13:00
Rohit Nirmal 6001366aac Alsa: Silence -Wsign-compare warning. 2015-10-02 21:10:06 -05:00
booto 6c28ea58ab AlsaSound: fix buffer type, clean up macros 2015-09-30 19:14:03 +08:00
Moncef Mechri 333f998123 Don't busy wait in the audio thread (ALSA)
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-11 03:54:54 +02:00
Tillmann Karras 30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
Tillmann Karras cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
Lioncash 07d4dbe657 AudioCommon: Add missing override specifiers
Also removes unnecessary virtual keywords.
2015-05-24 06:10:03 -04:00
Lioncash 35ee8a1362 SoundStream: Internally construct the mixer
Instead of creating the mixer externally and then passing it in, it can just be made within the class.
2015-05-24 05:49:41 -04:00
Lioncash f907e5cace AlsaSoundStream: Use an enum class for signifying ALSA thread state 2015-05-11 01:56:01 -04:00
Lioncash 353205132c AlsaSoundStream: Convert volatile variables to atomics 2015-05-11 01:55:59 -04:00
Rohit Nirmal fbc64984ca Include CommonTypes.h instead of Common.h. 2014-09-08 15:39:58 -04:00
Lioncash f94e764df5 AudioCommon: Clean up brace placements 2014-08-30 18:06:42 -04:00
lioncash aecc8ea666 Remove usesMixer function from the sound streams.
This isn't used anywhere in the codebase. Not even the base SoundStream has it as part of its interface.
2014-03-18 10:42:07 -04:00
lioncash 5e5ab61d0c Mark the audio streams as final.
These aren't intended to be continually extended.
2014-03-18 10:37:45 -04:00
Tillmann Karras f28116b7da clang-modernize -add-override 2014-03-09 21:12:01 +01:00
Lioncash 2afe215271 Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
lioncash d2038049f5 Replace all include guard ifdefs with "#pragma once" 2014-02-10 18:07:16 -05:00
Jasper St. Pierre 34692ab826 Remove unnecessary Src/ folders 2013-12-31 14:03:19 -05:00