yuzu-mainline/src/audio_core
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
..
algorithm Make the coding conventions more consistant 2020-12-30 19:03:26 -05:00
audio_out.cpp common: Move settings to common from core. 2021-04-14 16:24:03 -07:00
audio_out.h audren: Make use of nodiscard, rework downmixing, release all buffers 2020-11-17 14:14:29 +11:00
audio_renderer.cpp Decouple audio processing and run at variable rate 2021-06-27 15:58:07 +01:00
audio_renderer.h Decouple audio processing and run at variable rate 2021-06-27 15:58:07 +01:00
behavior_info.cpp behavior_info: Fix typo Renerer -> Renderer 2020-09-25 17:14:02 -04:00
behavior_info.h audren: Make use of nodiscard, rework downmixing, release all buffers 2020-11-17 14:14:29 +11:00
buffer.h audio_core: Make shadowing and unused parameters errors 2020-12-03 00:54:31 -05:00
CMakeLists.txt Add SDL2 audio backend 2021-06-06 11:28:38 +02:00
codec.cpp Revert "core: Fix clang build" 2020-10-20 19:07:39 -07:00
codec.h codec: Make lookup table static constexpr 2020-09-25 14:24:25 -04:00
command_generator.cpp revert to std::sin and std::cos 2021-02-12 18:48:10 -08:00
command_generator.h audren: Implement I3dl2Reverb 2021-02-12 18:48:10 -08:00
common.h audio_core: common: Bump audio revision to 9. 2021-06-24 18:22:10 -07:00
cubeb_sink.cpp common: Move settings to common from core. 2021-04-14 16:24:03 -07:00
cubeb_sink.h Revert "core: Fix clang build" 2020-10-20 19:07:39 -07:00
delay_line.cpp address issues 2021-02-12 18:48:10 -08:00
delay_line.h revert to std::sin and std::cos 2021-02-12 18:48:10 -08:00
effect_context.cpp revert to std::sin and std::cos 2021-02-12 18:48:10 -08:00
effect_context.h audren: Implement I3dl2Reverb 2021-02-12 18:48:10 -08:00
info_updater.cpp general: Replace RESULT_SUCCESS with ResultSuccess 2021-06-02 00:39:27 -04:00
info_updater.h audio_core: Make shadowing and unused parameters errors 2020-12-03 00:54:31 -05:00
memory_pool.cpp audio_core: Make shadowing and unused parameters errors 2020-12-03 00:54:31 -05:00
memory_pool.h audio_core: Make shadowing and unused parameters errors 2020-12-03 00:54:31 -05:00
mix_context.cpp Revert "core: Fix clang build" 2020-10-20 19:07:39 -07:00
mix_context.h audren: Make use of nodiscard, rework downmixing, release all buffers 2020-11-17 14:14:29 +11:00
null_sink.h audio_core: Make g_sink_details internally linked 2018-12-13 16:44:32 -05:00
sdl2_sink.cpp Various suggestions by v1993 and lioncash 2021-06-07 12:51:59 +02:00
sdl2_sink.h Add SDL2 audio backend 2021-06-06 11:28:38 +02:00
sink.h audio_core: Sinks need unique names as well. 2018-08-04 14:34:12 -04:00
sink_context.cpp audio_core: Make shadowing and unused parameters errors 2020-12-03 00:54:31 -05:00
sink_context.h Add missing includes (#6521) 2021-06-24 03:24:17 -04:00
sink_details.cpp Add SDL2 audio backend 2021-06-06 11:28:38 +02:00
sink_details.h audio_core: Make g_sink_details internally linked 2018-12-13 16:44:32 -05:00
sink_stream.h audio_core: Flush stream when not playing anything 2018-09-12 18:09:14 +01:00
splitter_context.cpp audio_core: Make shadowing and unused parameters errors 2020-12-03 00:54:31 -05:00
splitter_context.h audio_core: Make shadowing and unused parameters errors 2020-12-03 00:54:31 -05:00
stream.cpp Implement audout GetAudioOutPlayedSampleCount 2021-06-22 04:39:17 +01:00
stream.h Implement audout GetAudioOutPlayedSampleCount 2021-06-22 04:39:17 +01:00
time_stretch.cpp audio_core: remove unnecessary spaces on comments 2019-01-14 00:22:05 -02:00
time_stretch.h Revert "core: Fix clang build" 2020-10-20 19:07:39 -07:00
voice_context.cpp audio_core: Make shadowing and unused parameters errors 2020-12-03 00:54:31 -05:00
voice_context.h core: Silence Wclass-memaccess warnings 2021-01-15 16:31:19 -03:00