summaryrefslogtreecommitdiff
path: root/src/input_common/analog_from_button.cpp
diff options
context:
space:
mode:
authorKelebek1 <eeeedddccc@hotmail.co.uk>2021-06-20 15:23:16 +0100
committerKelebek1 <eeeedddccc@hotmail.co.uk>2021-06-27 15:58:07 +0100
commit0857d6a3dbcaeb30b51326419fb56d9b543601f1 (patch)
tree26221ce096533b188aa1fe8d7e82290780edee1d /src/input_common/analog_from_button.cpp
parent432fab7c4f7c8664b2f9319fd6ac6cb8960407e4 (diff)
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.
Diffstat (limited to 'src/input_common/analog_from_button.cpp')
0 files changed, 0 insertions, 0 deletions