mirror of
https://github.com/mozilla/cubeb
synced 2024-11-21 14:29:11 -07:00
In resampler's input_needed_for_output do not mix rates
This commit is contained in:
parent
bbbe5bb0b2
commit
eb8fb7e87d
1 changed files with 2 additions and 2 deletions
|
@ -291,8 +291,8 @@ public:
|
||||||
int32_t resampled_frames_left =
|
int32_t resampled_frames_left =
|
||||||
samples_to_frames(resampling_out_buffer.length());
|
samples_to_frames(resampling_out_buffer.length());
|
||||||
float input_frames_needed =
|
float input_frames_needed =
|
||||||
(output_frame_count - unresampled_frames_left) * resampling_ratio -
|
(output_frame_count - resampled_frames_left) * resampling_ratio -
|
||||||
resampled_frames_left;
|
unresampled_frames_left;
|
||||||
if (input_frames_needed < 0) {
|
if (input_frames_needed < 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue