OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 11 matching lines...) Expand all Loading... |
22 | 22 |
23 namespace webrtc { | 23 namespace webrtc { |
24 namespace test { | 24 namespace test { |
25 | 25 |
26 AcmSendTest::AcmSendTest(InputAudioFile* audio_source, | 26 AcmSendTest::AcmSendTest(InputAudioFile* audio_source, |
27 int source_rate_hz, | 27 int source_rate_hz, |
28 int test_duration_ms) | 28 int test_duration_ms) |
29 : clock_(0), | 29 : clock_(0), |
30 audio_source_(audio_source), | 30 audio_source_(audio_source), |
31 source_rate_hz_(source_rate_hz), | 31 source_rate_hz_(source_rate_hz), |
32 input_block_size_samples_(source_rate_hz_ * kBlockSizeMs / 1000), | 32 input_block_size_samples_( |
| 33 static_cast<size_t>(source_rate_hz_ * kBlockSizeMs / 1000)), |
33 codec_registered_(false), | 34 codec_registered_(false), |
34 test_duration_ms_(test_duration_ms), | 35 test_duration_ms_(test_duration_ms), |
35 frame_type_(kAudioFrameSpeech), | 36 frame_type_(kAudioFrameSpeech), |
36 payload_type_(0), | 37 payload_type_(0), |
37 timestamp_(0), | 38 timestamp_(0), |
38 sequence_number_(0) { | 39 sequence_number_(0) { |
39 webrtc::AudioCoding::Config config; | 40 webrtc::AudioCoding::Config config; |
40 config.clock = &clock_; | 41 config.clock = &clock_; |
41 config.transport = this; | 42 config.transport = this; |
42 acm_.reset(webrtc::AudioCoding::Create(config)); | 43 acm_.reset(webrtc::AudioCoding::Create(config)); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 last_payload_vec_.size()); | 133 last_payload_vec_.size()); |
133 Packet* packet = | 134 Packet* packet = |
134 new Packet(packet_memory, allocated_bytes, clock_.TimeInMilliseconds()); | 135 new Packet(packet_memory, allocated_bytes, clock_.TimeInMilliseconds()); |
135 assert(packet); | 136 assert(packet); |
136 assert(packet->valid_header()); | 137 assert(packet->valid_header()); |
137 return packet; | 138 return packet; |
138 } | 139 } |
139 | 140 |
140 } // namespace test | 141 } // namespace test |
141 } // namespace webrtc | 142 } // namespace webrtc |
OLD | NEW |