This can reduce audio latency according to
https://developer.android.com/ndk/guides/audio/opensl/opensl-prog-notes#perform.
Previously we were using the hardcoded values of 48000 Hz and 256 frames
per buffer. The sample rate we use with this change is 48000 Hz on all
devices I'm aware of, but the buffer size does vary across devices.
Terminology note: The old code used the term "sample" to refer to what
Android refers to as a "frame". "Frame" is a clearer term to use for
this, so I've changed OpenSLESStream's terminology. One frame consists
of one sample per channel.
Not sure if we're ever going to want to have more than one of these at
the same time, but these global variables are a code smell nonetheless.
I'm also deleting the existing member variables because they were
unused.
Refactors the PatchAllowlistTest to streamline the experience for developers. Instead of a textual description of what needs to change in ApprovedInis.json for RetroAchievements compatibility, the test will now generate a replacement file and instruct the coder where to copy it in their local branch, and what to update APPROVED_LIST_HASH to. The result should be easier and more instructive for developers to make changes, while still maintaining that allowed codes cannot be added or modified without recompiling Dolphin.
As ApprovedInis.json no longer needs to be user-readable for this process, it no longer contains titles or pretty formatting and as such is updated in this commit, hash included.
This was causing deadlocks when a game didn't load (including if RetroAchievements does not yet support it) because it was attempting to close the queue the the callback was currently running on, forcing LoadGameCallback to wait for LoadGameCallback to finish. However, it appears that recent changes to the queue have independently resolved the reason CloseGame was being called here in the first place.
Fix the UI hanging for several seconds when opening the Controllers
window.
Move the scan for Bluetooth adapters onto a separate thread so the Host
thread doesn't have to wait for it.
Only automatically scan for adapters once, when opening the Controllers
window for the first time. Add a Refresh button to let the user refresh
the adapter list afterward.
This feature allows overriding the frequency of the Vertical Blank Interrupt. For many games, this means that their gameplay speed will change without affecting audio, which would be useful by itself (e.g. grinding in RPGs).
However, there are games that use delta time for their game logic, which allows them to be played at >60 FPS at the same gameplay speed!
Some games aren't dynamic though, and require a patch to adjust their game speed variable.
On real hardware, stswi and stswx don't trigger any of the special
behavior for uncached unaligned writes that was implemented in 543ed8a.
This is confirmed by a hwtest (a new commit in
https://github.com/dolphin-emu/hwtests/pull/42).
This change fixes Dolphin's stswi and stswx implementations so they stop
triggering the special behavior, bringing them back to the behavior they
had before 543ed8a. No games are known to be affected, but Extrems has
reported that it affects homebrew they've made.