Browse Source
Decouple audio processing and run at variable rate
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.nce_cpp
3 changed files with 115 additions and 79 deletions
-
56src/audio_core/audio_renderer.cpp
-
6src/audio_core/audio_renderer.h
-
10src/core/hle/service/audio/audren_u.cpp
Write
Preview
Loading…
Cancel
Save
Reference in new issue