Revert "Don't account for unresampled data when computing how much input is needed."

This reverts commit d0127cdb66.
From testing this caused the audio to get out of sync(delayed)
in Citra.
This commit is contained in:
Vitor Kiguchi 2020-10-14 15:22:23 -03:00 коммит произвёл Paul Adenot
Родитель c0adf049c2
Коммит 2575d731d2
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -307,9 +307,11 @@ public:
uint32_t input_needed_for_output(int32_t output_frame_count) const
{
assert(output_frame_count >= 0); // Check overflow
int32_t unresampled_frames_left = samples_to_frames(resampling_in_buffer.length());
int32_t resampled_frames_left = samples_to_frames(resampling_out_buffer.length());
float input_frames_needed =
output_frame_count * resampling_ratio - resampled_frames_left;
float input_frames_needed =
(output_frame_count - unresampled_frames_left) * resampling_ratio
- resampled_frames_left;
if (input_frames_needed < 0) {
return 0;
}