Commit Graph

59 Commits

Author SHA1 Message Date
JosJuice 7197e3abd0 Use structs for config callback IDs
This way you can't mix up regular config callback IDs and CPU thread
config callback IDs. (It would be rather bad if you did!)
2023-08-17 19:19:26 +02:00
Joshua de Reeper f27e8216a5 Skylander Portal: Play Trap Team Audio
Asserts and length handling
2023-03-13 13:01:48 +13:00
Sam Belliveau 673f81c18a New FrameTime/VBlank Analyzer + Graph 2022-12-23 19:52:53 -05:00
CasualPokePlayer 4234b25682 Do not directly store input sample rate, rather just store a divisor for that sample rate, with it using a fixed dividend of 54000000 * 2.
This should reduce (but not completely eliminate) gradual audio desyncs in dumps. This also allows for accurate sample rates for the GameCube.
Completely eliminating gradual audio desyncs will require resampling to an integer sample rate, as nothing seems to support a non-integer sample rate.
2022-07-03 15:07:06 -07:00
CasualPokePlayer ad892176d0 have audio dumps apply volume (fixes cases of audio dumps being "too loud" and in game audio controls having no effect) 2022-06-10 21:27:10 -07:00
Admiral H. Curtiss eb5bb2993e
Core/AudioCommon: Add config caching to Mixer. 2022-01-06 16:43:43 +01:00
Pokechu22 78bfd25964 Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
Bonta 502def7f71 Mixer: Support GBA samples mixing 2021-07-13 16:40:07 +02: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
LAGonauta 3c9eb37381 Allow user to change DPLII decoding quality 2019-10-22 22:55:15 -03:00
LAGonauta df631f0d75 Swapped FFDShow's DPL2 decoder by FreeSurround
Added class in AudioCommon for the surround decoder
2019-02-13 22:52:40 -02:00
spycrab 40bb9974f2 Reformat all the things! 2018-04-12 21:28:39 +02:00
JosJuice b00ef39c1c Fix DTK audio not working after loading a savestate
The main problem was that the volume of the mixer wasn't savestated.
The volume is typically 0 at the beginning of a game, so loading a
savestate at the beginning of a game would lead to silent DTK audio.

I also added savestating to StreamADPCM.cpp.
2017-11-06 09:15:14 +01:00
Michael Maltese b2c9d6d217 Rename CMixer to Mixer 2017-06-26 15:01:07 -07:00
Michael Maltese 14c3d4716f AudioStretcher: split StretchAudio into ProcessSamples / GetStretchedSamples 2017-06-03 16:54:00 -07:00
Michael Maltese 87a467fe42 AudioCommon: extract AudioStretcher class for time-stretching 2017-06-03 16:54:00 -07:00
Michael Maltese a4508e85e8 AudioCommon: move DPL2 decoding into Mixer 2017-06-03 16:53:59 -07:00
MerryMage 9397fdfe95 Mixer: Use a temporary buffer when stretching audio 2017-04-12 14:58:20 +01:00
MerryMage f5018010d3 Mixer: Calculate actual_samples based on availability in all FIFOs 2017-04-12 14:58:19 +01:00
MerryMage 26514358f4 Add audio stretching as a configuration option 2017-04-12 13:56:29 +01:00
MerryMage b8c867dd7a Mixer: Implement audio stretching 2017-04-12 13:56:28 +01:00
Chris Burgener ca2eaac704 Split Audio Dumps on Sample Rate Changes 2016-06-24 21:12:15 -04:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Lioncash c70487163f Mixer: Convert defines into concrete variables
Gets defines out of global scope.
2016-01-15 23:41:53 -05:00
Lioncash fc6a2f490f Mixer: Directly initialize class members 2016-01-14 01:32:31 -05:00
Lioncash 531a3ed09a Mixer: Devirtualize
Nothing in the codebase inherits from this class
2016-01-14 01:32:24 -05:00
degasus 888c377b57 Throttler + Mixer: Configureable variance 2015-11-03 08:22:36 +01: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
Lioncash 9dd607b923 Mixer: Fix erroneous global prefixes on class variables 2015-06-20 21:48:50 -04:00
Lioncash d81dffd4f0 Mixer: Devirtualize DTK and DSP audio logging functions
Their functionality is already complete in the base class; there's no need to allow overriding.
2015-06-20 21:46:20 -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 7b376abd3b Mixer: Convert volatile variables to atomics. 2015-05-11 01:55:50 -04:00
Markus Wick e0b0ef3868 Revert "High quality resampler" 2015-02-23 18:43:13 +01:00
kamiyo e864521182 High Quality Resampler, using FIR filter
For more information:
https://docs.google.com/document/d/1tBEgsJh7QiwNwepXI0eobfK3U8LkJButSyeuFt1degM/edit?usp=sharing

removed: SSE includes (not used)

added: 16bit -> float -> 16bit functions
added: linear interpolator and high-quality (windowed-sinc) interpolator functions (including Resampler class)
added: dithering

changed: renamed variables and reformatted a few things to fit with style guide (braces, #include->const)
changed: use s16, u16, s32, u32 etc
changed: store samples and do all computations as floats
changed: volume from 0 - 255
2015-02-18 21:13:45 -05:00
Fog fc4125cdd1 Proper Audio/Video Dumping 2014-10-09 00:06:04 -04:00
skidau 8abe9622fd Route the wiimote speaker to the sound mixer (the host system's speakers). Emulated Wiimote speaker sounds will go to the host system's speakers. Real Wiimotes will continue to use their own speaker for Wiimote speaker sounds. All Wiimote speaker sound can be disabled by unchecking the "Enable Speaker Data" option.
Each emulated Wiimote can have its speaker routed from left to right via the "Speaker Pan" setting in the emulated wiimote settings dialog.  Use any value from -127 for leftmost to 127 for rightmost with 0 being the centre.

Added code in the InputConfig to use a spin control for non-boolean values.

Defaulted the setting of "Enable Speaker Data" to disabled.
2014-09-07 14:16:20 +10:00
skidau 3caab10df8 Hooked up the emulated Wiimote speaker.
The Wiimotes are positioned as follows:
Wiimote 0 = Center
Wiimote 1 = Left
Wiimote 2 = Right
Wiimote 3 = Center

The Wiimote speaker output can be disabled via the "Enable Speaker Data" checkbox in the Wiimote settings.
2014-09-07 14:16:20 +10:00
Lioncash d18d3e1f3e Common: Get rid of StdConditionVariable, StdMutex, and StdThread.
All of the compilers we support have support for these now.
2014-08-16 23:33:19 -04:00
Tony Wasserka 9c7d4b6408 Merge pull request #667 from RachelBryk/remove-audio-limit
Remove audio frame limit.
2014-07-28 14:38:35 +02: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
booto 7d920bbb3a AudioCommon/Mixer: Allow input sample rate changes 2014-07-24 22:42:29 +08:00
Scott Mansell a0101c5d29 Audio Mixer: move Static variable to a member variable.
The two instances of this class were sharing a frac variable causing
audio glitches when both were running (which is now all the time).

Fixes issue 7463 (Since DTK merge, audio has staic in it).
2014-07-17 18:26:21 +12:00
Tillmann Karras d3fa8a6167 Reorder class initializer lists 2014-07-04 03:53:22 +02:00
magumagu ca0203a1cc AudioCommon: restore support for DTK volume setting. 2014-06-26 16:56:57 -07:00
magumagu affb7c17fc Audio mixer: fix a couple compiler warnings. 2014-06-15 14:51:33 -07: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
magumagu ae9367a89b Delete a bunch of old audio HLE cruft.
This commit intentionally breaks audio output from HLE Zelda UCode; no other functional change.
2014-03-26 11:17:19 -07:00