Kelebek1
b46191d104
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.
5 years ago
bunnei
2c6a61d4dd
audio_core: common: Bump audio revision to 9.
- This is used in fw 12.x.x games.
5 years ago
Chloe
a9a9167009
Add missing includes ( #6521 )
* Add missing includes
* Add array
5 years ago
Kelebek1
5015541902
Implement audout GetAudioOutPlayedSampleCount
Used in Ninja Gaiden games.
5 years ago
Clément Gallet
3af2ea232f
Various suggestions by v1993 and lioncash
5 years ago
Clément Gallet
34848e5eda
Add SDL2 audio backend
5 years ago
Morph
7ebc38a6d1
general: Replace RESULT_SUCCESS with ResultSuccess
Transition to PascalCase for result names.
5 years ago
bunnei
7a76bc30fa
common: Move settings to common from core.
- Removes a dependency on core and input_common from common.
5 years ago
Chloe Marcec
6d5a42e4aa
revert to std::sin and std::cos
5 years ago
Chloe Marcec
dccb1546a8
address issues
5 years ago
Chloe Marcec
dffe01cb67
audren: Implement I3dl2Reverb
Most notable fix is the voices in Fire Emblem Three Houses
5 years ago
german
e0c83e305a
Prevent over scheduling audio events and terminate properly the motion update event
5 years ago
Chloe Marcec
6619834395
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
5 years ago
Chloe Marcec
b467478dcf
audout: FlushAudioOutBuffers
Fixes Devil May Cry
5 years ago
ReinUsesLisp
4854f3291e
core: Silence Wclass-memaccess warnings
This requires making several types trivial and properly initialize
them whenever they are called.
5 years ago
ReinUsesLisp
92ca4929f5
common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINIT
INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
5 years ago
16-Bit-Dog
a96fd630b4
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...
5 years ago
bunnei
e5f216261e
hle: service: Acquire and release a lock on requests.
- This makes it such that we can safely access service members from CoreTiming thread.
5 years ago
bunnei
93b4668017
audio_core: stream: Ensure buffer is valid before release.
5 years ago
Vitor Kiguchi
31a3bf1b8c
Update cubeb and request a persistent stream session
6 years ago
Lioncash
29db886722
audio_core: Make shadowing and unused parameters errors
Moves the audio code closer to enabling warnings as errors in general.
5 years ago
Chloe Marcec
35f0c8e80e
audio_core: Remove temp_mix_buffer
It's unused and doesn't need to be initialized
5 years ago
Chloe Marcec
808da92335
Addressed changes
6 years ago
Chloe Marcec
a894cf5169
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
6 years ago
Lioncash
2d48020ca5
core: Fix clang build pt.2
Resolves the clang build issue in a more unintrusive way.
6 years ago
bunnei
deb3536936
Revert "core: Fix clang build"
6 years ago
Lioncash
18636013c9
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
6 years ago
Lioncash
8452ec7d7b
audio_core/CMakeLists: Make warnings consistent with core
Normalizes the warnings shared between audio_core and core.
6 years ago
Lioncash
3e926b6481
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.
6 years ago
Lioncash
a97ec95061
behavior_info: Fix typo Renerer -> Renderer
6 years ago
Lioncash
1fc5fae82f
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.
6 years ago
Lioncash
f2c756b0f4
codec: Make lookup table static constexpr
Allows compilers to elide needing to push these values on the stack
every time the function is called.
6 years ago
Lioncash
c6fe328f73
audio_core: Remove unnecessary inclusions
Same behavior, but removes header dependencies where they don't need to
be.
6 years ago
Lioncash
8e2814d9ad
audio_core: Resolve sign conversion warnings
While were at it, we can also enable sign conversion warnings and other
common warnings as errors to prevent these from creeping back into the
codebase.
6 years ago
Lioncash
165a083705
effect_context: Make use of explicit where applicable
While we're at it we can make the destructor of the base class virtual
to ensure that any polymorphism issues never occur.
6 years ago
Lioncash
6632af0301
audio_core/command_generator: Use const references where applicable
In a lot of cases, we can make use of const references rather than
non-const references.
While we're in the area we can silence some truncation and sign
conversion warnings.
6 years ago
Lioncash
d0b648ecf8
audio_core/command_generator: Avoid an unnecessary copy in GenerateFinalMixCommand()
6 years ago
David Marcec
f17f347e03
Preliminary effects
6 years ago
David Marcec
ac9d36c1dc
Disable biquad filter
6 years ago
David Marcec
2b0185e2a0
Reworked ADPCM decoder to allow better streaming
6 years ago
Lioncash
78ddcbe3ba
General: Tidy up clang-format warnings part 2
6 years ago
David Marcec
0cd3851934
mix buffer depopping
6 years ago
David Marcec
6368b02526
adpcm streaming
6 years ago
Lioncash
7decda6bc2
core_timing: Make use of uintptr_t to represent user_data
Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly.
6 years ago
David Marcec
844bee65b3
Fix perf regression
6 years ago
David Marcec
5f24aa9e0f
Fix stream channel count when outputting to stereo
6 years ago
David Marcec
7cdad5d1fb
Address issues
6 years ago
David Marcec
4c85fba0db
Queue extra mix buffer
6 years ago
David Marcec
f1ec702c03
Disable time stretcher for time being
6 years ago
David Marcec
81b2b4fbe9
audio_core: Apollo Part 1, AudioRenderer refactor
6 years ago