Index: webrtc/modules/audio_mixer/audio_frame_manipulator_unittest.cc |
diff --git a/webrtc/modules/audio_mixer/audio_frame_manipulator_unittest.cc b/webrtc/modules/audio_mixer/audio_frame_manipulator_unittest.cc |
index 26258a28dc54e521868c08a71003aca0b461d3c3..e163d0f0ca51c833bfbd361b81ecd0ec1bf25b4f 100644 |
--- a/webrtc/modules/audio_mixer/audio_frame_manipulator_unittest.cc |
+++ b/webrtc/modules/audio_mixer/audio_frame_manipulator_unittest.cc |
@@ -23,8 +23,9 @@ void FillFrameWithConstants(size_t samples_per_channel, |
AudioFrame* frame) { |
frame->num_channels_ = number_of_channels; |
frame->samples_per_channel_ = samples_per_channel; |
- std::fill(frame->data_, |
- frame->data_ + samples_per_channel * number_of_channels, value); |
+ int16_t* frame_data = frame->mutable_data(); |
+ std::fill(frame_data, |
+ frame_data + samples_per_channel * number_of_channels, value); |
} |
} // namespace |
@@ -40,8 +41,9 @@ TEST(AudioFrameManipulator, CompareForwardRampWithExpectedResultStereo) { |
const int total_samples = kSamplesPerChannel * kNumberOfChannels; |
const int16_t expected_result[total_samples] = {0, 0, 1, 1, 2, 2, 3, 3, 4, 4}; |
+ const int16_t* frame_data = frame.data(); |
EXPECT_TRUE( |
- std::equal(frame.data_, frame.data_ + total_samples, expected_result)); |
+ std::equal(frame_data, frame_data + total_samples, expected_result)); |
} |
TEST(AudioFrameManipulator, CompareBackwardRampWithExpectedResultMono) { |
@@ -56,8 +58,9 @@ TEST(AudioFrameManipulator, CompareBackwardRampWithExpectedResultMono) { |
const int total_samples = kSamplesPerChannel * kNumberOfChannels; |
const int16_t expected_result[total_samples] = {5, 4, 3, 2, 1}; |
+ const int16_t* frame_data = frame.data(); |
EXPECT_TRUE( |
- std::equal(frame.data_, frame.data_ + total_samples, expected_result)); |
+ std::equal(frame_data, frame_data + total_samples, expected_result)); |
} |
} // namespace webrtc |