1
0
Fork 0

Merge pull request #4834 from wwylele/cubeb-sign

audio_core/cubeb: silent signed/unsigned comparison warning
This commit is contained in:
Pengfei Zhu 2019-07-15 07:31:47 +08:00 committed by GitHub
commit b27a9e1710
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ long CubebInput::Impl::DataCallback(cubeb_stream* stream, void* user_data, const
samples.reserve(num_frames * impl->sample_size_in_bytes); samples.reserve(num_frames * impl->sample_size_in_bytes);
if (impl->sample_size_in_bytes == 1) { if (impl->sample_size_in_bytes == 1) {
// If the sample format is 8bit, then resample back to 8bit before passing back to core // If the sample format is 8bit, then resample back to 8bit before passing back to core
for (std::size_t i; i < num_frames; i++) { for (std::size_t i = 0; i < static_cast<std::size_t>(num_frames); i++) {
s16 data; s16 data;
std::memcpy(&data, static_cast<const u8*>(input_buffer) + i * 2, 2); std::memcpy(&data, static_cast<const u8*>(input_buffer) + i * 2, 2);
samples.push_back(resample_s16_s8(data)); samples.push_back(resample_s16_s8(data));