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

Side by Side Diff: webrtc/modules/audio_device/ios/audio_device_unittest_ios.cc

Issue 2362263002: Fixes minor issue in AudioDeviceTest.RunPlayoutAndRecordingInFullDuplex for iOS (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 const int seconds = 576 const int seconds =
577 static_cast<int>(bytes / (sample_rate * kBytesPerSample)); 577 static_cast<int>(bytes / (sample_rate * kBytesPerSample));
578 PRINTD("file size: %d [secs]\n", seconds); 578 PRINTD("file size: %d [secs]\n", seconds);
579 PRINTD("file size: %" PRIuS " [callbacks]\n", 579 PRINTD("file size: %" PRIuS " [callbacks]\n",
580 seconds * kNumCallbacksPerSecond); 580 seconds * kNumCallbacksPerSecond);
581 #endif 581 #endif
582 return file_name; 582 return file_name;
583 } 583 }
584 584
585 void StartPlayout() { 585 void StartPlayout() {
586 EXPECT_FALSE(audio_device()->PlayoutIsInitialized());
587 EXPECT_FALSE(audio_device()->Playing()); 586 EXPECT_FALSE(audio_device()->Playing());
588 EXPECT_EQ(0, audio_device()->InitPlayout()); 587 EXPECT_EQ(0, audio_device()->InitPlayout());
589 EXPECT_TRUE(audio_device()->PlayoutIsInitialized()); 588 EXPECT_TRUE(audio_device()->PlayoutIsInitialized());
590 EXPECT_EQ(0, audio_device()->StartPlayout()); 589 EXPECT_EQ(0, audio_device()->StartPlayout());
591 EXPECT_TRUE(audio_device()->Playing()); 590 EXPECT_TRUE(audio_device()->Playing());
592 } 591 }
593 592
594 void StopPlayout() { 593 void StopPlayout() {
595 EXPECT_EQ(0, audio_device()->StopPlayout()); 594 EXPECT_EQ(0, audio_device()->StopPlayout());
596 EXPECT_FALSE(audio_device()->Playing()); 595 EXPECT_FALSE(audio_device()->Playing());
597 EXPECT_FALSE(audio_device()->PlayoutIsInitialized());
598 } 596 }
599 597
600 void StartRecording() { 598 void StartRecording() {
601 EXPECT_FALSE(audio_device()->RecordingIsInitialized());
602 EXPECT_FALSE(audio_device()->Recording()); 599 EXPECT_FALSE(audio_device()->Recording());
603 EXPECT_EQ(0, audio_device()->InitRecording()); 600 EXPECT_EQ(0, audio_device()->InitRecording());
604 EXPECT_TRUE(audio_device()->RecordingIsInitialized()); 601 EXPECT_TRUE(audio_device()->RecordingIsInitialized());
605 EXPECT_EQ(0, audio_device()->StartRecording()); 602 EXPECT_EQ(0, audio_device()->StartRecording());
606 EXPECT_TRUE(audio_device()->Recording()); 603 EXPECT_TRUE(audio_device()->Recording());
607 } 604 }
608 605
609 void StopRecording() { 606 void StopRecording() {
610 EXPECT_EQ(0, audio_device()->StopRecording()); 607 EXPECT_EQ(0, audio_device()->StopRecording());
611 EXPECT_FALSE(audio_device()->Recording()); 608 EXPECT_FALSE(audio_device()->Recording());
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 StopPlayout(); 853 StopPlayout();
857 StopRecording(); 854 StopRecording();
858 // Verify that the correct number of transmitted impulses are detected. 855 // Verify that the correct number of transmitted impulses are detected.
859 EXPECT_EQ(latency_audio_stream->num_latency_values(), 856 EXPECT_EQ(latency_audio_stream->num_latency_values(),
860 static_cast<size_t>( 857 static_cast<size_t>(
861 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); 858 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1));
862 latency_audio_stream->PrintResults(); 859 latency_audio_stream->PrintResults();
863 } 860 }
864 861
865 } // namespace webrtc 862 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698