Fix -Wc++11-narrowing: chromecast/
Bug: 1216696 Change-Id: If7043f9306fad53cfe30f21974fcc1f994877921 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2975061 Commit-Queue: Peter Kasting <pkasting@chromium.org> Commit-Queue: Sean Topping <seantopping@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org> Reviewed-by: Sean Topping <seantopping@chromium.org> Cr-Commit-Position: refs/heads/master@{#894151}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
6cc645c62d
commit
1896d917cb
chromecast/media/cma/backend
@ -108,7 +108,7 @@ PostProcessingPipelineImpl::PostProcessingPipelineImpl(
|
||||
processors_.emplace_back(PostProcessorInfo{
|
||||
factory_.CreatePostProcessor(library_path, processor_config_string,
|
||||
channels),
|
||||
1.0 /* output_frames_per_input_frame */, processor_name});
|
||||
1 /* output_frames_per_input_frame */, processor_name});
|
||||
channels = processors_.back().ptr->GetStatus().output_channels;
|
||||
}
|
||||
num_output_channels_ = channels;
|
||||
|
@ -997,27 +997,27 @@ TEST_F(StreamMixerTest, TwoUnscaledStreamsMixProperlyWithEdgeCases) {
|
||||
kMinSample,
|
||||
kMinSample,
|
||||
kMinSample,
|
||||
0.0,
|
||||
0.0,
|
||||
0,
|
||||
0,
|
||||
kMaxSample,
|
||||
0.0,
|
||||
0.0,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
{
|
||||
kMinSample,
|
||||
0.0,
|
||||
0,
|
||||
kMaxSample,
|
||||
0.0,
|
||||
0,
|
||||
kMaxSample,
|
||||
kMaxSample,
|
||||
0.0,
|
||||
0.0,
|
||||
0,
|
||||
0,
|
||||
}};
|
||||
|
||||
// Hand-calculate the results. Index 0 is clamped to -(2^31). Index 5 is
|
||||
// clamped to 2^31-1.
|
||||
const int32_t kResult[8] = {
|
||||
kMinSample, kMinSample, 0.0, 0.0, kMaxSample, kMaxSample, 0.0, 0.0,
|
||||
kMinSample, kMinSample, 0, 0, kMaxSample, kMaxSample, 0, 0,
|
||||
};
|
||||
|
||||
// Populate the streams with data.
|
||||
|
@ -62,8 +62,9 @@ class PushBufferQueueTests : public testing::Test {
|
||||
static PushBufferRequest CreateAudioBufferRequest(int64_t pts_micros,
|
||||
bool end_of_stream,
|
||||
TData... data) {
|
||||
return CreateAudioBufferRequest(pts_micros, end_of_stream,
|
||||
std::vector<uint8_t>{uint8_t{data}...});
|
||||
return CreateAudioBufferRequest(
|
||||
pts_micros, end_of_stream,
|
||||
std::vector<uint8_t>{static_cast<uint8_t>(data)...});
|
||||
}
|
||||
|
||||
static PushBufferRequest CreateAudioBufferRequest(
|
||||
|
@ -81,7 +81,7 @@ void VolumeMap::LoadVolumeMap(std::unique_ptr<base::Value> cast_audio_config) {
|
||||
CHECK(volume_map_entry->GetDouble(kKeyDb, &db));
|
||||
CHECK_LE(db, 0.0);
|
||||
|
||||
new_map.push_back({level, db});
|
||||
new_map.push_back({static_cast<float>(level), static_cast<float>(db)});
|
||||
}
|
||||
|
||||
if (new_map.empty()) {
|
||||
|
Reference in New Issue
Block a user