Neither variant of the core sends a number of samples per frame that match the nominal expected values given by the sample rate and fps set in retro_get_system_av_info()
Due to integer rounding errors, the non-plus core always sends too few samples
The 'plus' version of the core sends the 'correct' number of samples, in terms of actual emulation - but this does not tally with the sample rate reported to the frontend. Moreover, the 'plus' core calls the audio batch callback twice per frame, which unduly stresses the frontend audio buffer
As a result, the core has bad audio/video synchronisation, affecting frame pacing.
This PR fixes the issue:
The audio sample rate is now reported as 32040 Hz
The non-plus core uses an accumulator to ensure that 'fractional' audio samples are accounted for and sent when required
The plus core now uploads audio samples only once per frame
In addition, the PR:
Fixes three memory leaks that were found in the core
Modifies the Console Region core option to require a restart (since it has never been possible to change this at runtime...)
At present, the core has bad audio sample pacing:
retro_get_system_av_info()
As a result, the core has bad audio/video synchronisation, affecting frame pacing.
This PR fixes the issue:
In addition, the PR:
Console Region
core option to require a restart (since it has never been possible to change this at runtime...)