Skip to content

Commit

Permalink
Add logging statement when input audio dropping happens
Browse files Browse the repository at this point in the history
  • Loading branch information
padenot committed Jul 21, 2022
1 parent 015f3c6 commit dc511c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cubeb_resampler_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class passthrough_resampler : public cubeb_resampler, public processor {
uint32_t to_keep = min_buffered_audio_frame(sample_rate);
uint32_t available = samples_to_frames(internal_input_buffer.length());
if (available > to_keep) {
ALOGV("Dropping %u frames", available - to_keep);
internal_input_buffer.pop(nullptr,
frames_to_samples(available - to_keep));
}
Expand Down Expand Up @@ -325,6 +326,7 @@ template <typename T> class cubeb_resampler_speex_one_way : public processor {
uint32_t available = samples_to_frames(resampling_in_buffer.length());
uint32_t to_keep = min_buffered_audio_frame(source_rate);
if (available > to_keep) {
ALOGV("Dropping %u frames", available - to_keep);
resampling_in_buffer.pop(nullptr, frames_to_samples(available - to_keep));
}
}
Expand Down Expand Up @@ -470,6 +472,7 @@ template <typename T> class delay_line : public processor {
size_t available = samples_to_frames(delay_input_buffer.length());
uint32_t to_keep = min_buffered_audio_frame(sample_rate);
if (available > to_keep) {
ALOGV("Dropping %u frames", available - to_keep);
delay_input_buffer.pop(nullptr, frames_to_samples(available - to_keep));
}
}
Expand Down

0 comments on commit dc511c6

Please sign in to comment.