Commit graph

377 commits

Author SHA1 Message Date
Lioncash
1019e52885 audio_manager: Remove dependence on system state
This isn't used by the class, so this can be removed for the time being.
2022-09-21 09:26:42 -04:00
bunnei
bc648de552 Merge pull request #8914 from lioncash/audio-const
audio_core: Mark several member functions as const
2022-09-16 23:51:31 -07:00
Morph
8eb4dc577c Merge pull request #8911 from lioncash/cexpr-string
audio_device: Make AudioDeviceName constructor constexpr
2022-09-16 10:18:58 -04:00
Lioncash
98396de8f3 audio_renderer: Pass command buffer by const reference
This is just being copied and isn't modified at all.
2022-09-16 10:06:53 -04:00
Lioncash
d4623d8dc8 sink_stream: Mark GetQueueSize as const 2022-09-16 10:00:52 -04:00
Lioncash
80bcd1a873 node_states: Mark relevant member functions as const 2022-09-16 09:59:56 -04:00
Lioncash
f7da76494b i3dl2/reverb: Mark relevant member functions as const
These two don't modify member state.
2022-09-16 09:58:49 -04:00
Lioncash
5629e0e145 behavior_info: Mark CopyErrorInfo as const
This doesn't modify member state.

We can also mark the parameter of AppendError as const as well, since it
isn't modified.
2022-09-16 09:55:17 -04:00
Lioncash
a66000f077 audio_device: Mark GetDeviceVolume as const
This doesn't modify instance state.
2022-09-16 09:52:34 -04:00
Lioncash
7ed5490b2f audio_render_manager: Mark several functions as const 2022-09-16 09:50:32 -04:00
Lioncash
7ee4876f17 audio_in: Mark several functions as const
These functions don't modify class state, so we can mark them as such
2022-09-16 09:45:54 -04:00
Lioncash
1e6ce3d3c9 audio_out: Mark several functions as const
These don't affect class state, so we can mark them as such.
2022-09-16 09:45:51 -04:00
Lioncash
12b4a200e9 audio_buffers: Pass by const-ref in AppendBuffers
This function doesn't modify the passed in buffer, so we can make that
explicit.
2022-09-16 09:36:03 -04:00
Lioncash
f726bcbf56 device_session: Convert for loop into ranged for in AppendBuffers
Simplifies the indexing code a little bit.
2022-09-16 09:32:57 -04:00
Lioncash
0bf42e31e4 device_session: Pass arguments by const-ref in relevant functions
These functions don't modify the passed in audio buffers, so we can
signify that in the interface.
2022-09-16 09:31:33 -04:00
bunnei
ba667d9af0 Merge pull request #8878 from Kelebek1/remove_pause
Remove pause callbacks from coretiming
2022-09-15 13:50:13 -07:00
liamwhite
714af6a6ac Merge pull request #8901 from lioncash/docs
audio_core: Amend documentation comment tags
2022-09-15 10:36:18 -04:00
Lioncash
af8ce57e18 audio_core: Amend documentation tags
Resolves a wackload of -Wdocumentation warnings due to mismatching tags
and whatnot.
2022-09-15 09:47:23 -04:00
Lioncash
1747b5ae6c audio_device: Mark member functions as const where applicable
These member functions don't modify any internal state.
2022-09-15 09:06:17 -04:00
Lioncash
0f1024b334 audio_device: Make AudioDeviceName constructor constexpr
These are used as read-only arrays, so we can make the data read-only
and available at compile-time.

Now constructing an AudioDevice no longer needs to initialize some
tables
2022-09-15 09:03:40 -04:00
Lioncash
b3c364d18b compressor: Simplify memset in InitializeCompressorEffect
Provides equivalent behavior while being significantly smaller.
2022-09-13 13:34:58 -04:00
Lioncash
d145c663c3 compressor: Mark params parameters as const
These functions don't modify the parameters.
2022-09-13 13:33:41 -04:00
Lioncash
3a30364ff1 compressor: Remove unneeded casts in ApplyCompressorEffect
Same behavior, but also silences a -Wcast-qual warning, since the second
cast casts away const.
2022-09-13 13:28:54 -04:00
Kelebek1
c6d4071162 Remove pause callbacks from coretiming 2022-09-13 13:20:35 +01:00
Kelebek1
0c01ac7410 Remove a pragma once from a cpp file 2022-09-12 19:27:11 +01:00
Kelebek1
77a30f7286 Don't stall with nvdec 2022-09-04 05:41:06 +01:00
Kelebek1
c3e3874d8d Rework audio output, connecting AudioOut into coretiming to fix desync during heavy loads. 2022-09-02 04:43:04 +01:00
Kelebek1
26353451be Do some log memes to help perceived volume 2022-08-12 19:59:09 +01:00
Liam
9484b3a70e audio_core: fix -Wuninitialized when compiling with ASan 2022-07-29 23:30:01 -04:00
Kelebek1
c7ea6ef8a3 Avoid depop out of bounds 2022-07-27 23:17:18 +01:00
Andrea Pappacoda
6a2efdda2f chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.

Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.

The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.

Following REUSE has a few advantages over the current approach:

- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
  `.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
  files like binary assets / images is always accurate and up to date

To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.

[REUSE]: https://reuse.software

Follow-up to b2eb103829
2022-07-27 12:53:49 +02:00
Kelebek1
be1f5f1d9f Project Andio 2022-07-22 01:11:32 +01:00
Kelebek1
03de5e053d Rework CoreTiming 2022-07-10 06:59:40 +01:00
german77
c7890ebccc core: Replace all instances of ResultCode with Result 2022-06-26 20:21:37 -05:00
Mai
bb0a6faa0a Merge pull request #8383 from Morph1984/shadow-of-the-past
yuzu: Make variable shadowing a compile-time error
2022-06-14 21:08:58 -04:00
Liam
c1771c98f3 common: Change semantics of UNREACHABLE to unconditionally crash 2022-06-13 20:09:00 -04:00
Morph
6e1f9fa7b8 audio_core: Remove -Werror=unused-parameter
Removing this as we don't enforce unused parameter warnings elsewhere in the project, and explicitly specify -Wno-unused-parameter in the main CMakeLists.
2022-06-13 18:19:23 -04:00
Morph
e647661b76 CMakeLists: Make variable shadowing a compile-time error
Now that the entire project is free of variable shadowing, we can enforce this as a compile time error to prevent any further introduction of this logic bug.
2022-06-13 18:19:23 -04:00
Morph
a687a98cb1 command_generator: Use u8 for tap index lut
Using this smaller type saves 1024 bytes in the compiled executable.
2022-05-13 00:50:58 -04:00
Morph
2b87305d31 general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-23 05:55:32 -04:00
Andrea Pappacoda
04380c99e8 audio_core: remove time stretcher
Also drop the SoundTouch dependency
2022-04-01 19:54:58 +02:00
lat9nq
022e1edd24 audio_core: Update current process revision
Update CURRENT_PROCESS_REVISION from REV9 to REVA.

Used by Nintendo Entertainment System - Nintendo Switch Online 6.0.0 and
Super Nintendo Entertainment System - Nintendo Switch Online 3.0.0.
2022-02-11 00:56:13 -05:00
german77
c8364449df audio/stream: Adjust volume scale factor 2022-01-15 20:28:37 -06:00
ameerj
8969273d2d general: Add missing copyright notices 2021-12-05 16:18:53 -05:00
ameerj
f222d1e4ce 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
0e9a34da46 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
60e29dd3b0 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
51ba9450fe Replace NaN mix volume samples with silence.
Fixes Xenoblade Chronicles 2 blowing out the audio.
2021-07-08 17:42:15 +01:00
Morph
e027ca45c1 Merge pull request #6564 from Kelebek1/Audio
Support more PCM formats
2021-07-08 12:14:58 -04:00
Kelebek1
0a4e300431 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