OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 using testing::ReturnRef; | 36 using testing::ReturnRef; |
37 | 37 |
38 AudioDecodingCallStats MakeAudioDecodeStatsForTest() { | 38 AudioDecodingCallStats MakeAudioDecodeStatsForTest() { |
39 AudioDecodingCallStats audio_decode_stats; | 39 AudioDecodingCallStats audio_decode_stats; |
40 audio_decode_stats.calls_to_silence_generator = 234; | 40 audio_decode_stats.calls_to_silence_generator = 234; |
41 audio_decode_stats.calls_to_neteq = 567; | 41 audio_decode_stats.calls_to_neteq = 567; |
42 audio_decode_stats.decoded_normal = 890; | 42 audio_decode_stats.decoded_normal = 890; |
43 audio_decode_stats.decoded_plc = 123; | 43 audio_decode_stats.decoded_plc = 123; |
44 audio_decode_stats.decoded_cng = 456; | 44 audio_decode_stats.decoded_cng = 456; |
45 audio_decode_stats.decoded_plc_cng = 789; | 45 audio_decode_stats.decoded_plc_cng = 789; |
| 46 audio_decode_stats.decoded_muted_output = 987; |
46 return audio_decode_stats; | 47 return audio_decode_stats; |
47 } | 48 } |
48 | 49 |
49 const int kChannelId = 2; | 50 const int kChannelId = 2; |
50 const uint32_t kRemoteSsrc = 1234; | 51 const uint32_t kRemoteSsrc = 1234; |
51 const uint32_t kLocalSsrc = 5678; | 52 const uint32_t kLocalSsrc = 5678; |
52 const size_t kOneByteExtensionHeaderLength = 4; | 53 const size_t kOneByteExtensionHeaderLength = 4; |
53 const size_t kOneByteExtensionLength = 4; | 54 const size_t kOneByteExtensionLength = 4; |
54 const int kAbsSendTimeId = 2; | 55 const int kAbsSendTimeId = 2; |
55 const int kAudioLevelId = 3; | 56 const int kAudioLevelId = 3; |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 stats.accelerate_rate); | 350 stats.accelerate_rate); |
350 EXPECT_EQ(Q14ToFloat(kNetworkStats.currentPreemptiveRate), | 351 EXPECT_EQ(Q14ToFloat(kNetworkStats.currentPreemptiveRate), |
351 stats.preemptive_expand_rate); | 352 stats.preemptive_expand_rate); |
352 EXPECT_EQ(kAudioDecodeStats.calls_to_silence_generator, | 353 EXPECT_EQ(kAudioDecodeStats.calls_to_silence_generator, |
353 stats.decoding_calls_to_silence_generator); | 354 stats.decoding_calls_to_silence_generator); |
354 EXPECT_EQ(kAudioDecodeStats.calls_to_neteq, stats.decoding_calls_to_neteq); | 355 EXPECT_EQ(kAudioDecodeStats.calls_to_neteq, stats.decoding_calls_to_neteq); |
355 EXPECT_EQ(kAudioDecodeStats.decoded_normal, stats.decoding_normal); | 356 EXPECT_EQ(kAudioDecodeStats.decoded_normal, stats.decoding_normal); |
356 EXPECT_EQ(kAudioDecodeStats.decoded_plc, stats.decoding_plc); | 357 EXPECT_EQ(kAudioDecodeStats.decoded_plc, stats.decoding_plc); |
357 EXPECT_EQ(kAudioDecodeStats.decoded_cng, stats.decoding_cng); | 358 EXPECT_EQ(kAudioDecodeStats.decoded_cng, stats.decoding_cng); |
358 EXPECT_EQ(kAudioDecodeStats.decoded_plc_cng, stats.decoding_plc_cng); | 359 EXPECT_EQ(kAudioDecodeStats.decoded_plc_cng, stats.decoding_plc_cng); |
| 360 EXPECT_EQ(kAudioDecodeStats.decoded_muted_output, |
| 361 stats.decoding_muted_output); |
359 EXPECT_EQ(kCallStats.capture_start_ntp_time_ms_, | 362 EXPECT_EQ(kCallStats.capture_start_ntp_time_ms_, |
360 stats.capture_start_ntp_time_ms); | 363 stats.capture_start_ntp_time_ms); |
361 } | 364 } |
362 | 365 |
363 TEST(AudioReceiveStreamTest, SetGain) { | 366 TEST(AudioReceiveStreamTest, SetGain) { |
364 ConfigHelper helper; | 367 ConfigHelper helper; |
365 internal::AudioReceiveStream recv_stream( | 368 internal::AudioReceiveStream recv_stream( |
366 helper.congestion_controller(), helper.config(), helper.audio_state(), | 369 helper.congestion_controller(), helper.config(), helper.audio_state(), |
367 helper.event_log()); | 370 helper.event_log()); |
368 EXPECT_CALL(*helper.channel_proxy(), | 371 EXPECT_CALL(*helper.channel_proxy(), |
369 SetChannelOutputVolumeScaling(FloatEq(0.765f))); | 372 SetChannelOutputVolumeScaling(FloatEq(0.765f))); |
370 recv_stream.SetGain(0.765f); | 373 recv_stream.SetGain(0.765f); |
371 } | 374 } |
372 } // namespace test | 375 } // namespace test |
373 } // namespace webrtc | 376 } // namespace webrtc |
OLD | NEW |