Commit Graph

44 Commits

Author SHA1 Message Date
Michael M a988a8a458 AudioCommon: make SetSoundStreamRunning idempotent 2017-11-19 12:09:54 -08: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
Michael M d6985fc3e8 AudioCommon: rename ClearAudioBuffer(mute) to SetSoundStreamRunning(running) 2017-10-21 16:28:04 -07:00
Michael Maltese 21fa010bb6 Remove CoreAudio audio backend
Cubeb handles everything the CoreAudio backend can, plus supports DPL2.
2017-06-29 16:53:20 -07:00
Michael Maltese b2c9d6d217 Rename CMixer to Mixer 2017-06-26 15:01:07 -07:00
Michael Maltese f6e1da0dc0 AudioCommon: add Cubeb backend 2017-05-27 18:28:56 -07:00
Michael Maltese c538cdcd47 AudioCommon: set volume _after_ starting stream
Fixes an error with the CoreAudio backend, which apparently doesn't
allow you to set the volume before starting the stream:

```
59:31:087 AudioCommon/CoreAudioSoundStream.cpp:97 E[Audio]: error setting volume
```

This shouldn't cause any problems with other backends, since the mixer
starts with silence anyways.
2017-04-20 02:06:42 -07:00
Michael Maltese af63235dc4 Remove libao sound backend
A single person uses it[0], and it sometimes messes up the Linux
buildbots ("ninja: error: 'ao', needed by 'Binaries/dolphin-emu', missing
and no known rule to make it").

[0]: https://analytics.dolphin-emu.org/stats/popular-audio-backends.txt
2017-03-31 14:59:57 -07:00
JosJuice 01073946b4 Fix default audio backend on Android being "No audio output"
People who already have encountered the problem will need to
manually change the audio backend (or delete the config INI).
2017-02-08 21:29:27 +01:00
Florent Castelli 9ebfaa9324 AudioCommon: Move logic for default sound backend there from ConfigManager
This way, we don't have to leak the HAVE_ALSA define there.
2017-02-05 02:55:04 +01:00
Florent Castelli 31dfaafe0b AudioCommon: Remove checks against NullSound::isValid()
The NullAudio backend is guaranteed to be compiled in, so no reason
to check it.
In addition to that, if it wasn't valid, it wouldn't work as a fallback
in InitSoundStream as there are uses to g_sound_stream later.
2017-02-05 02:55:04 +01:00
Lioncash 87f2a74c08 AudioCommon: Remove unnecessary headers
Now AudioCommon code won't need to be recompiled if the TAS movie header
is ever modified.
2016-12-11 06:11:37 -05:00
Michael Maltese 45903b7b4d AudioCommon: SupportsDPL2Decoder, SupportsLatencyControl, SupportsVolumeChanges 2016-10-09 19:18:16 -07:00
Lioncash 128d762aea AudioCommon: const correctness 2016-07-31 19:14:20 -04:00
Lioncash ecc1710676 AudioCommon: Make the SoundStream global a unique_ptr 2016-07-31 15:45:28 -04:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Rohit Nirmal 3b75f45cf6 Fix building with PCH disabled. 2015-09-28 11:51:08 -05:00
Lioncash cc036ca86c Common: Remove other Common prefixed headers from Common.h 2015-09-26 18:51:58 -04:00
Markus Wick e297e3e666 Merge pull request #2825 from lioncash/log
AudioCommon: Log to AUDIO, not DSPHLE
2015-08-10 10:25:51 +02:00
Moncef Mechri 8b767a1189 Use dummy audio backend if the selected backend fails to start
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-10 03:46:45 +02:00
Lioncash 3f78d74fc1 AudioCommon: Log to AUDIO, not DSPHLE
This code is not related to DSPHLE.
2015-08-09 21:36:03 -04:00
degasus 9a96e3c416 AudioCommon: Remove lock on Pause state
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-28 19:58:18 +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 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
FL.dolphinemu 78f8bf7423 Issue 7968: Added keybinds for increasing, decreasing, and muting audio. 2014-12-28 22:03:21 +01:00
Fog f2ed533841 Start/Stop Audio Dump During Emulation 2014-10-15 20:50:38 -04:00
Fog fc4125cdd1 Proper Audio/Video Dumping 2014-10-09 00:06:04 -04:00
Lioncash 7f7fb5e70c AudioCommon: Prefix soundStream global with g_ 2014-09-30 03:06:16 -04:00
Lioncash 377a1c8f20 AudioCommon: Get rid of now unused handle param for InitSoundStream() 2014-08-30 23:36:00 -04:00
Shawn Hoffman af2405eefd Remove dsound audio backend.
There isn't any reason to use dsound over xaudio.
2014-08-23 11:19:19 -07:00
Rachel Bryk acaac51077 Remove audio frame limit.
It serves no purpose and causes bugs and confusion for users.
2014-07-25 12:17:10 -04:00
magumagu d43ecd0bd1 Rewrite handling of DTK (streaming) audio.
The primary motivation here is to make sure we submit samples from the
CPU thread. This makes sure the timing of related interrupts accurate,
and generally keeps the different kinds of audio synchronized.  This will also
allow improvements to audio dumping functionality.

The new code is also more concise because it gets rid of some duplicated
audio mixing code.
2014-06-14 15:55:20 -07:00
Pierre Bourdon 76fafb1c7b Merge pull request #220 from magumagu/audio-handling-cleanup-v2
Audio handling cleanup v2
2014-03-30 13:24:52 +02:00
magumagu 3afa17f752 Move audio handling out of DSP emulation.
This is good for a couple of reasons: one, it gets rid of duplicated code,
and two, DSP emulation shouldn't need to interact with audio in the first
place.
2014-03-29 11:19:32 -07:00
magumagu 78499e5b7c Delete AudioCommon::UseJIT(). 2014-03-29 11:19:31 -07:00
magumagu 102ea55f20 Move mixer construction to AudioCommon.cpp. 2014-03-29 11:19:30 -07:00
Pierre Bourdon 664c8d30a0 Remove all trailing whitespaces from our codebase. 2014-03-29 11:05:44 +01:00
Lioncash a82675b7d5 Kill off some usages of c_str.
Also changes some function params, but this is ok.
Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
2014-03-14 13:51:23 -04:00
Tillmann Karras 6914eca167 Fix various warnings reported by clang
- mostly remove unused variables
- rename some generic JIT identifiers
2014-02-28 12:28:19 +01:00
Pierre Bourdon fca12c4c4e Fix more header sorting issues in AudioCommon/ (now check-includes clean). 2014-02-20 01:01:10 +01:00
Lioncash 2afe215271 Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
Jasper St. Pierre 34692ab826 Remove unnecessary Src/ folders 2013-12-31 14:03:19 -05:00