Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: webrtc/modules/audio_coding/test/TestStereo.cc

Issue 2750783004: Add mute state field to AudioFrame. (Closed)
Patch Set: Third round of comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 } 800 }
801 } 801 }
802 802
803 // Run received side of ACM 803 // Run received side of ACM
804 bool muted; 804 bool muted;
805 EXPECT_EQ(0, acm_b_->PlayoutData10Ms(out_freq_hz_b, &audio_frame, &muted)); 805 EXPECT_EQ(0, acm_b_->PlayoutData10Ms(out_freq_hz_b, &audio_frame, &muted));
806 ASSERT_FALSE(muted); 806 ASSERT_FALSE(muted);
807 807
808 // Write output speech to file 808 // Write output speech to file
809 out_file_.Write10MsData( 809 out_file_.Write10MsData(
810 audio_frame.data_, 810 audio_frame.data(),
811 audio_frame.samples_per_channel_ * audio_frame.num_channels_); 811 audio_frame.samples_per_channel_ * audio_frame.num_channels_);
812 } 812 }
813 813
814 EXPECT_EQ(0, error_count); 814 EXPECT_EQ(0, error_count);
815 815
816 // Check that packet size is in the right range for variable rate codecs, 816 // Check that packet size is in the right range for variable rate codecs,
817 // such as Opus. 817 // such as Opus.
818 if (variable_packets > 0) { 818 if (variable_packets > 0) {
819 variable_bytes /= variable_packets; 819 variable_bytes /= variable_packets;
820 EXPECT_NEAR(variable_bytes, pack_size_bytes_, 18); 820 EXPECT_NEAR(variable_bytes, pack_size_bytes_, 18);
(...skipping 25 matching lines...) Expand all
846 printf("%s -> ", send_codec->plname); 846 printf("%s -> ", send_codec->plname);
847 } 847 }
848 CodecInst receive_codec; 848 CodecInst receive_codec;
849 acm_b_->ReceiveCodec(&receive_codec); 849 acm_b_->ReceiveCodec(&receive_codec);
850 if (test_mode_ != 0) { 850 if (test_mode_ != 0) {
851 printf("%s\n", receive_codec.plname); 851 printf("%s\n", receive_codec.plname);
852 } 852 }
853 } 853 }
854 854
855 } // namespace webrtc 855 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698