ameerj
5daf3abe65
common/logging: Move Log::Entry declaration to a separate header
...
This reduces the load of requiring to include std::chrono in all files which include log.h
2021-10-01 20:48:49 -04:00
bunnei
7d464f73c9
Merge pull request #6571 from Kelebek1/Mix
...
audio_core: Replace NaN mix volume samples with silence
2021-07-12 22:09:05 -07:00
Ameer J
5edc96f4a4
Merge pull request #6539 from lat9nq/default-setting
...
general: Move most settings' defaults and labels into their definition
2021-07-08 14:46:31 -04:00
Kelebek1
7905eb0254
Replace NaN mix volume samples with silence.
...
Fixes Xenoblade Chronicles 2 blowing out the audio.
2021-07-08 17:42:15 +01:00
Morph
92a3daf029
Merge pull request #6564 from Kelebek1/Audio
...
Support more PCM formats
2021-07-08 12:14:58 -04:00
Kelebek1
7636fefb71
audio_core: Preserve front channel volume after 6 to 2 downmix
...
Many games report 6 channel output while only providing data for 2. We only output 2-channel audio regardless, and in the downmixing, front left/right only provide 36% of their volume. This is done assuming all of the other channels also contain valid data, but in many games they don't. This PR alters the downmixing to preserve front left/right, so volume is not lost.
This improves volume in Link's Awakening, New Super Mario Bros U, Disgaea 6, Super Kirby Clash.
2021-07-08 17:07:23 +01:00
Kelebek1
dbcc093d88
Support more PCM formats. Fixes Ys IX audio.
2021-07-06 18:43:23 +01:00
Morph
ebb82b0b83
CMakeLists: Treat -Wsign-compare as an error on GCC/Clang
...
Treats (un)signed comparison mismatches as errors to be consistent with MSVC
2021-07-06 12:50:09 -04:00
Kelebek1
b455043e45
Fix XC2/VOEZ crashing, add audio looping and a few misc fixes
2021-07-01 06:01:01 +01:00
lat9nq
b91b76df4f
general: Make most settings a BasicSetting
...
Creates a new BasicSettings class in common/settings, and forces setting
a default and label for each setting that uses it in common/settings.
Moves defaults and labels from both frontends into common settings.
Creates a helper function in each frontend to facillitate reading the
settings now with the new default and label properties.
Settings::Setting is also now a subclass of Settings::BasicSetting. Also
adds documentation for both Setting and BasicSetting.
2021-06-28 17:32:17 -04:00
Kelebek1
0857d6a3db
Decouple audio processing and run at variable rate
...
Currently, processing of audio samples is called from AudioRenderer's Update method, using a fixed 4 buffers to process the given samples. Games call Update at variable rates, depending on framerate and/or sample count, which causes inconsistency in audio processing. From what I've seen, 60 FPS games update every ~0.004s, but 30 FPS/160 sample games update somewhere between 0.02 and 0.04, 5-10x slower. Not enough samples get fed to the backend, leading to a lot of audio skipping.
This PR seeks to address this by de-coupling the audio consumption and the audio update. Update remains the same without calling for buffer queuing, and the consume now schedules itself to run based on the sample rate and count.
2021-06-27 15:58:07 +01:00
bunnei
50d0cc2716
audio_core: common: Bump audio revision to 9.
...
- This is used in fw 12.x.x games.
2021-06-24 18:22:10 -07:00
Chloe
f216a9432b
Add missing includes ( #6521 )
...
* Add missing includes
* Add array
2021-06-24 03:24:17 -04:00
Kelebek1
ba3af04da1
Implement audout GetAudioOutPlayedSampleCount
...
Used in Ninja Gaiden games.
2021-06-22 04:39:17 +01:00
Clément Gallet
f611506dca
Various suggestions by v1993 and lioncash
2021-06-07 12:51:59 +02:00
Clément Gallet
c7c99905f4
Add SDL2 audio backend
2021-06-06 11:28:38 +02:00
Morph
12c1766997
general: Replace RESULT_SUCCESS with ResultSuccess
...
Transition to PascalCase for result names.
2021-06-02 00:39:27 -04:00
bunnei
a4c6712a4b
common: Move settings to common from core.
...
- Removes a dependency on core and input_common from common.
2021-04-14 16:24:03 -07:00
Chloe Marcec
7ad63ea542
revert to std::sin and std::cos
2021-02-12 18:48:10 -08:00
Chloe Marcec
d28b942458
address issues
2021-02-12 18:48:10 -08:00
Chloe Marcec
4a7fd91857
audren: Implement I3dl2Reverb
...
Most notable fix is the voices in Fire Emblem Three Houses
2021-02-12 18:48:10 -08:00
bunnei
7666c0994c
Merge pull request #5868 from german77/HandheldFix
...
Prevent over scheduling audio events and add motion update unschedule event
2021-02-08 11:33:53 -08:00
german
7784b1da6d
Prevent over scheduling audio events and terminate properly the motion update event
2021-02-02 10:17:10 -06:00
Chloe Marcec
9fc7f60b94
audren: Disable reverb for the time being
...
As this is causing issues in a few games, it's best to have it disabled until it's completely implemented
2021-02-01 14:41:58 +11:00
Chloe Marcec
b2b95e96c1
audout: FlushAudioOutBuffers
...
Fixes Devil May Cry
2021-01-24 19:13:34 +11:00
ReinUsesLisp
f8650a9580
core: Silence Wclass-memaccess warnings
...
This requires making several types trivial and properly initialize
them whenever they are called.
2021-01-15 16:31:19 -03:00
ReinUsesLisp
3ff978aa4f
common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINIT
...
INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
2021-01-15 16:27:28 -03:00
bunnei
60121d8f28
Merge pull request #5264 from 16-Bit-Dog/patch-1
...
Make the coding conventions more consistant
2020-12-31 01:46:53 -08:00
16-Bit-Dog
fa5a1a4bfd
Make the coding conventions more consistant
...
lut_index had 0 added when nothing was supposed to be added
despite this, index was not added to 0 when nothing was supposed to be added...
2020-12-30 19:03:26 -05:00
bunnei
7d77a3f88f
hle: service: Acquire and release a lock on requests.
...
- This makes it such that we can safely access service members from CoreTiming thread.
2020-12-28 21:33:34 -08:00
bunnei
c7a06908ae
audio_core: stream: Ensure buffer is valid before release.
2020-12-28 21:33:34 -08:00
Vitor Kiguchi
a1e7360273
Update cubeb and request a persistent stream session
2020-12-05 22:26:41 +01:00
bunnei
88089c8754
Merge pull request #5000 from lioncash/audio-error
...
audio_core: Make shadowing and unused parameters errors
2020-12-02 23:08:43 -08:00
Lioncash
1ea6bdef05
audio_core: Make shadowing and unused parameters errors
...
Moves the audio code closer to enabling warnings as errors in general.
2020-12-03 00:54:31 -05:00
Chloe Marcec
d7019d8307
audio_core: Remove temp_mix_buffer
...
It's unused and doesn't need to be initialized
2020-11-28 23:25:28 +11:00
Chloe Marcec
908d3c5679
Addressed changes
2020-11-17 15:40:19 +11:00
Chloe Marcec
9a4beac95a
audren: Make use of nodiscard, rework downmixing, release all buffers
...
Preliminary work for upmixing & general cleanup. Fixes basic issues in games such as Shovel Knight and slightly improves the LEGO games. Upmixing stitll needs to be implemented.
Audio levels in a few games will be fixed as we now use the downmix coefficients when possible instead of supplying our own
2020-11-17 14:14:29 +11:00
Lioncash
e408bd3b7c
core: Fix clang build pt.2
...
Resolves the clang build issue in a more unintrusive way.
2020-10-20 22:16:03 -04:00
bunnei
3d592972dc
Revert "core: Fix clang build"
2020-10-20 19:07:39 -07:00
Lioncash
be1954e04c
core: Fix clang build
...
Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.
Fixes #4795
2020-10-17 19:50:39 -04:00
Lioncash
9f9b64d280
audio_core/CMakeLists: Make warnings consistent with core
...
Normalizes the warnings shared between audio_core and core.
2020-10-13 16:36:58 -04:00
bunnei
09609dd50e
Merge pull request #4721 from lioncash/genfn
...
codec: Make lookup table static constexpr
2020-09-29 15:16:24 -07:00
bunnei
2a82f1b08b
Merge pull request #4722 from lioncash/casting
...
cubeb_sink: Use static_cast instead of reinterpret_cast in DataCallback()
2020-09-29 15:09:12 -07:00
bunnei
a8be822e8e
Merge pull request #4719 from lioncash/audio-warn
...
audio_core: Resolve sign conversion warnings
2020-09-27 01:52:59 -07:00
bunnei
891090799c
Merge pull request #4720 from lioncash/header
...
audio_core: Remove unnecessary inclusions
2020-09-25 22:04:26 -07:00
Lioncash
90c6141164
command_generator: Make lookup table static constexpr
...
Allows compilers to elide needing to push these values on the stack
every time the function is called.
2020-09-25 18:33:04 -04:00
Lioncash
dc83ca8914
behavior_info: Fix typo Renerer -> Renderer
2020-09-25 17:14:02 -04:00
Lioncash
4073931305
cubeb_sink: Use static_cast instead of reinterpret_cast in DataCallback()
...
Conversions from void* to the proper data type are well-defined and
supported by static_cast. We don't need to use reinterpret_cast here.
2020-09-25 17:10:02 -04:00
Lioncash
7c0908f301
codec: Make lookup table static constexpr
...
Allows compilers to elide needing to push these values on the stack
every time the function is called.
2020-09-25 14:24:25 -04:00
Lioncash
966966dc02
audio_core: Remove unnecessary inclusions
...
Same behavior, but removes header dependencies where they don't need to
be.
2020-09-25 13:19:42 -04:00