summaryrefslogtreecommitdiff
path: root/media/libcubeb/unresampled-frames.patch
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-10-27 19:40:52 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-11-02 23:02:42 -0400
commitd162ecbaffe845c9707da5d2f6cab11f343ef00e (patch)
tree0f4312565334c3dc0f167c5648508c150d2c5dec /media/libcubeb/unresampled-frames.patch
parent21b3f6247403c06f85e1f45d219f87549862198f (diff)
downloaduxp-d162ecbaffe845c9707da5d2f6cab11f343ef00e.tar.gz
Issue #1267 - Part 1: Update libcubeb to a1200c34.
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
-