Commit 4150899d authored by Hongchan Choi's avatar Hongchan Choi Committed by Commit Bot

Use const and static_cast for priming FIFO in AudioDestination

A follow up CL from:
https://chromium-review.googlesource.com/c/chromium/src/+/1015201

Bug: 833766
Change-Id: Iaabea9e2801a43257871eeee2013e91fdb0f3d20
Reviewed-on: https://chromium-review.googlesource.com/1017003Reviewed-by: default avatarRaymond Toy <rtoy@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551759}
parent d41a6d14
......@@ -85,8 +85,9 @@ AudioDestination::AudioDestination(AudioIOCallback& callback,
// Primes the FIFO for the given callback buffer size. This is to prevent
// first FIFO pulls from causing "underflow" errors.
unsigned priming_render_quanta =
ceil(callback_buffer_size_/(float)AudioUtilities::kRenderQuantumFrames);
const unsigned priming_render_quanta =
ceil(callback_buffer_size_ /
static_cast<float>(AudioUtilities::kRenderQuantumFrames));
for (unsigned i = 0; i < priming_render_quanta; ++i) {
fifo_->Push(render_bus_.get());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment