OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include <algorithm> | 10 #include <algorithm> |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 const std::string audio_filename = | 225 const std::string audio_filename = |
226 test::ResourcePath("voice_engine/audio_long16", "pcm"); | 226 test::ResourcePath("voice_engine/audio_long16", "pcm"); |
227 ASSERT_STRNE("", audio_filename.c_str()); | 227 ASSERT_STRNE("", audio_filename.c_str()); |
228 test::FakeAudioDevice fake_audio_device(Clock::GetRealTimeClock(), | 228 test::FakeAudioDevice fake_audio_device(Clock::GetRealTimeClock(), |
229 audio_filename); | 229 audio_filename); |
230 EXPECT_EQ(0, voe_base->Init(&fake_audio_device, nullptr)); | 230 EXPECT_EQ(0, voe_base->Init(&fake_audio_device, nullptr)); |
231 int channel = voe_base->CreateChannel(); | 231 int channel = voe_base->CreateChannel(); |
232 | 232 |
233 SyncRtcpObserver audio_observer; | 233 SyncRtcpObserver audio_observer; |
234 | 234 |
| 235 AudioState::Config audio_state_config; |
| 236 audio_state_config.voice_engine = voice_engine; |
235 Call::Config receiver_config; | 237 Call::Config receiver_config; |
236 receiver_config.voice_engine = voice_engine; | 238 receiver_config.audio_state = AudioState::Create(audio_state_config); |
237 CreateCalls(Call::Config(), receiver_config); | 239 CreateCalls(Call::Config(), receiver_config); |
238 | 240 |
239 CodecInst isac = {103, "ISAC", 16000, 480, 1, 32000}; | 241 CodecInst isac = {103, "ISAC", 16000, 480, 1, 32000}; |
240 EXPECT_EQ(0, voe_codec->SetSendCodec(channel, isac)); | 242 EXPECT_EQ(0, voe_codec->SetSendCodec(channel, isac)); |
241 | 243 |
242 AudioPacketReceiver voe_packet_receiver(channel, voe_network); | 244 AudioPacketReceiver voe_packet_receiver(channel, voe_network); |
243 | 245 |
244 FakeNetworkPipe::Config net_config; | 246 FakeNetworkPipe::Config net_config; |
245 net_config.queue_delay_ms = 500; | 247 net_config.queue_delay_ms = 500; |
246 net_config.loss_percent = 5; | 248 net_config.loss_percent = 5; |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 int encoder_inits_; | 708 int encoder_inits_; |
707 uint32_t last_set_bitrate_; | 709 uint32_t last_set_bitrate_; |
708 VideoSendStream* send_stream_; | 710 VideoSendStream* send_stream_; |
709 VideoEncoderConfig encoder_config_; | 711 VideoEncoderConfig encoder_config_; |
710 } test; | 712 } test; |
711 | 713 |
712 RunBaseTest(&test, FakeNetworkPipe::Config()); | 714 RunBaseTest(&test, FakeNetworkPipe::Config()); |
713 } | 715 } |
714 | 716 |
715 } // namespace webrtc | 717 } // namespace webrtc |
OLD | NEW |