summaryrefslogtreecommitdiff
path: root/media/libcubeb/unresampled-frames.patch
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-08-12 14:14:18 +0000
committerMoonchild <moonchild@palemoon.org>2021-08-12 14:14:18 +0000
commit741fd8b61ccc5b3a01ccf8ff154ccb8ce80ecc38 (patch)
tree84249949ea79a4db724097c4924e986484a9733b /media/libcubeb/unresampled-frames.patch
parentfe2ea0ce886c6f7601d2eb27d508ecb9cb991e12 (diff)
downloaduxp-741fd8b61ccc5b3a01ccf8ff154ccb8ce80ecc38.tar.gz
Issue #1806 - Update libcubeb
This is a full lib update, changing callers where needed. This also moves GertCubeMSGLatencyInFrames to CubebUtils.{cpp|h} where it belongs.
Diffstat (limited to 'media/libcubeb/unresampled-frames.patch')
-rw-r--r--media/libcubeb/unresampled-frames.patch36
1 files changed, 0 insertions, 36 deletions
diff --git a/media/libcubeb/unresampled-frames.patch b/media/libcubeb/unresampled-frames.patch
deleted file mode 100644
index 714f3d4bae..0000000000
--- a/media/libcubeb/unresampled-frames.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 46d12e9ae6fa9c233bc32812b13185ee7df8d3fd Mon Sep 17 00:00:00 2001
-From: Paul Adenot <paul@paul.cx>
-Date: Thu, 10 Nov 2016 06:20:16 +0100
-Subject: [PATCH] Prevent underflowing the number of input frames needed in
- input when resampling. (#188)
-
----
- src/cubeb_resampler_internal.h | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/src/cubeb_resampler_internal.h b/src/cubeb_resampler_internal.h
-index e165cc2..3c37a04 100644
---- a/src/cubeb_resampler_internal.h
-+++ b/src/cubeb_resampler_internal.h
-@@ -263,9 +263,15 @@ public:
- * number of output frames will be exactly equal. */
- uint32_t input_needed_for_output(uint32_t output_frame_count)
- {
-- return (uint32_t)ceilf((output_frame_count - samples_to_frames(resampling_out_buffer.length()))
-- * resampling_ratio);
--
-+ 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 - unresampled_frames_left) * resampling_ratio
-+ - resampled_frames_left;
-+ if (input_frames_needed < 0) {
-+ return 0;
-+ }
-+ return (uint32_t)ceilf(input_frames_needed);
- }
-
- /** Returns a pointer to the input buffer, that contains empty space for at
---
-2.7.4
-