Bug 1314316 - Restore use of ceilf method instead of roundf. r?jesup draft
authorAlex Chronopoulos <achronop@gmail.com>
Tue, 01 Nov 2016 18:34:55 +0200
changeset 432318 879c9a365a796a21f6b24b00b5547a2660036b6f
parent 432301 4cde141bbedfd7355bdf3e9ac41740fb8fa2f06d
child 535596 a5b1b09fca88811a9a740ce032c1a32f16e59ce2
push id34254
push userachronop@gmail.com
push dateTue, 01 Nov 2016 16:37:14 +0000
reviewersjesup
bugs1314316
milestone52.0a1
Bug 1314316 - Restore use of ceilf method instead of roundf. r?jesup MozReview-Commit-ID: 5Wv5dqSy3B8
media/libcubeb/README_MOZILLA
media/libcubeb/src/cubeb_resampler_internal.h
--- a/media/libcubeb/README_MOZILLA
+++ b/media/libcubeb/README_MOZILLA
@@ -1,8 +1,8 @@
 The source from this directory was copied from the cubeb 
 git repository using the update.sh script.  The only changes
 made were those applied by update.sh and the addition of
 Makefile.in build files for the Mozilla build system.
 
 The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
 
-The git commit ID used was 9eacd3144b62ce2356c66c3260c9bc4151274192.
+The git commit ID used was 352c0bed012a770ef65aee1e507704922ea80b0e.
--- a/media/libcubeb/src/cubeb_resampler_internal.h
+++ b/media/libcubeb/src/cubeb_resampler_internal.h
@@ -258,18 +258,18 @@ public:
   }
 
   /** Returns the number of frames to pass in the input of the resampler to have
    * exactly `output_frame_count` resampled frames. This can return a number
    * slightly bigger than what is strictly necessary, but it guaranteed that the
    * number of output frames will be exactly equal. */
   uint32_t input_needed_for_output(uint32_t output_frame_count)
   {
-    return (uint32_t)roundf((output_frame_count - samples_to_frames(resampling_out_buffer.length()))
-                          * resampling_ratio);
+    return (uint32_t)ceilf((output_frame_count - samples_to_frames(resampling_out_buffer.length()))
+                           * resampling_ratio);
 
   }
 
   /** Returns a pointer to the input buffer, that contains empty space for at
    * least `frame_count` elements. This is useful so that consumer can directly
    * write into the input buffer of the resampler. The pointer returned is
    * adjusted so that leftover data are not overwritten.
    */