Chromium Code Reviews| Index: webrtc/modules/audio_coding/test/delay_test.cc |
| diff --git a/webrtc/modules/audio_coding/test/delay_test.cc b/webrtc/modules/audio_coding/test/delay_test.cc |
| index 7288d5040a45ba22da0d1eeb4de993e9815cbc9c..03de7556c70c736b64b5c011d2494c5003499c0e 100644 |
| --- a/webrtc/modules/audio_coding/test/delay_test.cc |
| +++ b/webrtc/modules/audio_coding/test/delay_test.cc |
| @@ -180,7 +180,6 @@ class DelayTest { |
| int num_frames = 0; |
| int in_file_frames = 0; |
| - uint32_t playout_ts; |
| uint32_t received_ts; |
| double average_delay = 0; |
| double inst_delay_sec = 0; |
| @@ -209,10 +208,10 @@ class DelayTest { |
| out_file_b_.Write10MsData( |
| audio_frame.data_, |
| audio_frame.samples_per_channel_ * audio_frame.num_channels_); |
| - acm_b_->PlayoutTimestamp(&playout_ts); |
| received_ts = channel_a2b_->LastInTimestamp(); |
| - inst_delay_sec = static_cast<uint32_t>(received_ts - playout_ts) |
| - / static_cast<double>(encoding_sample_rate_hz_); |
| + inst_delay_sec = |
| + static_cast<uint32_t>(received_ts - *acm_b_->PlayoutTimestamp()) / |
| + static_cast<double>(encoding_sample_rate_hz_); |
|
kwiberg-webrtc
2016/04/05 14:04:02
Consider ASSERTing that the optional was valid, to
hlundin-webrtc
2016/04/05 14:19:45
Done.
|
| if (num_frames > 10) |
| average_delay = 0.95 * average_delay + 0.05 * inst_delay_sec; |