aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPaul Adenot <[email protected]>2022-07-21 18:28:28 +0200
committerPaul Adenot <[email protected]>2022-07-21 18:34:39 +0200
commitdc511c6b3597b6384d28949285b9289e009830ea (patch)
tree3a63aa91bb8903f3fd2bfb17e621cd0a547e3428
parent015f3c632a16a107868dd301e755eb41b031c8c6 (diff)
downloadcubeb-dc511c6b3597b6384d28949285b9289e009830ea.tar.gz
cubeb-dc511c6b3597b6384d28949285b9289e009830ea.zip
Add logging statement when input audio dropping happens
-rw-r--r--src/cubeb_resampler_internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cubeb_resampler_internal.h b/src/cubeb_resampler_internal.h
index b271afc..285f24d 100644
--- a/src/cubeb_resampler_internal.h
+++ b/src/cubeb_resampler_internal.h
@@ -91,6 +91,7 @@ public:
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));
}
@@ -325,6 +326,7 @@ public:
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));
}
}
@@ -470,6 +472,7 @@ public:
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));
}
}