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 | 10 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 time_to_playout_audio_ms_--; | 134 time_to_playout_audio_ms_--; |
135 sender_clock_->AdvanceTimeMilliseconds(1); | 135 sender_clock_->AdvanceTimeMilliseconds(1); |
136 receiver_clock_->AdvanceTimeMilliseconds(1); | 136 receiver_clock_->AdvanceTimeMilliseconds(1); |
137 | 137 |
138 // Reset action. | 138 // Reset action. |
139 *action = 0; | 139 *action = 0; |
140 | 140 |
141 // Is it time to pull audio? | 141 // Is it time to pull audio? |
142 if (time_to_playout_audio_ms_ == 0) { | 142 if (time_to_playout_audio_ms_ == 0) { |
143 time_to_playout_audio_ms_ = kPlayoutPeriodMs; | 143 time_to_playout_audio_ms_ = kPlayoutPeriodMs; |
| 144 bool muted; |
144 receive_acm_->PlayoutData10Ms(static_cast<int>(FLAGS_output_fs_hz), | 145 receive_acm_->PlayoutData10Ms(static_cast<int>(FLAGS_output_fs_hz), |
145 &frame_); | 146 &frame_, &muted); |
| 147 ASSERT_FALSE(muted); |
146 fwrite(frame_.data_, sizeof(frame_.data_[0]), | 148 fwrite(frame_.data_, sizeof(frame_.data_[0]), |
147 frame_.samples_per_channel_ * frame_.num_channels_, pcm_out_fid_); | 149 frame_.samples_per_channel_ * frame_.num_channels_, pcm_out_fid_); |
148 *action |= kAudioPlayedOut; | 150 *action |= kAudioPlayedOut; |
149 } | 151 } |
150 | 152 |
151 // Is it time to push in next packet? | 153 // Is it time to push in next packet? |
152 if (time_to_insert_packet_ms_ <= .5) { | 154 if (time_to_insert_packet_ms_ <= .5) { |
153 *action |= kPacketPushedIn; | 155 *action |= kPacketPushedIn; |
154 | 156 |
155 // Update time-to-insert packet. | 157 // Update time-to-insert packet. |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 if (delay_log != NULL) { | 301 if (delay_log != NULL) { |
300 fprintf(delay_log, "%3d %3d\n", optimal_delay_ms, current_delay_ms); | 302 fprintf(delay_log, "%3d %3d\n", optimal_delay_ms, current_delay_ms); |
301 } | 303 } |
302 } | 304 } |
303 } | 305 } |
304 std::cout << std::endl; | 306 std::cout << std::endl; |
305 test.TearDown(); | 307 test.TearDown(); |
306 if (delay_log != NULL) | 308 if (delay_log != NULL) |
307 fclose(delay_log); | 309 fclose(delay_log); |
308 } | 310 } |
OLD | NEW |