diff --git a/media/libcubeb/src/cubeb_wasapi.cpp b/media/libcubeb/src/cubeb_wasapi.cpp index 351ee418fb8..d5867c16c0d 100644 --- a/media/libcubeb/src/cubeb_wasapi.cpp +++ b/media/libcubeb/src/cubeb_wasapi.cpp @@ -25,6 +25,7 @@ #include "cubeb/cubeb-stdint.h" #include "cubeb_resampler.h" #include +#include /**Taken from winbase.h, Not in MinGW.*/ #ifndef STACK_SIZE_PARAM_IS_A_RESERVATION @@ -474,7 +475,7 @@ refill(cubeb_stream * stm, float * data, long frames_needed) long out_frames = cubeb_resampler_fill(stm->resampler, dest, frames_needed); - clock_add(stm, frames_needed * stream_to_mix_samplerate_ratio(stm)); + clock_add(stm, roundf(frames_needed * stream_to_mix_samplerate_ratio(stm))); /* XXX: Handle this error. */ if (out_frames < 0) {