Do not directly store input sample rate, rather just store a divisor for that sample rate, with it using a fixed dividend of 54000000 * 2.

This should reduce (but not completely eliminate) gradual audio desyncs in dumps. This also allows for accurate sample rates for the GameCube.
Completely eliminating gradual audio desyncs will require resampling to an integer sample rate, as nothing seems to support a non-integer sample rate.
This commit is contained in:
CasualPokePlayer
2022-07-03 15:07:06 -07:00
parent edd89e343c
commit 4234b25682
11 changed files with 121 additions and 93 deletions

View File

@ -74,7 +74,7 @@ static std::recursive_mutex g_save_thread_mutex;
static std::thread g_save_thread;
// Don't forget to increase this after doing changes on the savestate system
constexpr u32 STATE_VERSION = 143; // Last changed in PR 10784
constexpr u32 STATE_VERSION = 144; // Last changed in PR 10762
// Maps savestate versions to Dolphin versions.
// Versions after 42 don't need to be added to this list,