зеркало из https://github.com/mozilla/cubeb.git
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:
Родитель
c0adf049c2
Коммит
2575d731d2
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче