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

Side by Side Diff: webrtc/modules/audio_device/android/audio_device_unittest.cc

Issue 1944883002: Move ADM Create() method to public interface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 | webrtc/modules/audio_device/android/audio_record_jni.h » ('j') | 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 GetAndroidAudioManagerForTest(); 555 GetAndroidAudioManagerForTest();
556 } 556 }
557 557
558 AudioDeviceBuffer* audio_device_buffer() const { 558 AudioDeviceBuffer* audio_device_buffer() const {
559 return audio_device_impl()->GetAudioDeviceBuffer(); 559 return audio_device_impl()->GetAudioDeviceBuffer();
560 } 560 }
561 561
562 rtc::scoped_refptr<AudioDeviceModule> CreateAudioDevice( 562 rtc::scoped_refptr<AudioDeviceModule> CreateAudioDevice(
563 AudioDeviceModule::AudioLayer audio_layer) { 563 AudioDeviceModule::AudioLayer audio_layer) {
564 rtc::scoped_refptr<AudioDeviceModule> module( 564 rtc::scoped_refptr<AudioDeviceModule> module(
565 AudioDeviceModuleImpl::Create(0, audio_layer)); 565 AudioDeviceModule::Create(0, audio_layer));
566 return module; 566 return module;
567 } 567 }
568 568
569 // Returns file name relative to the resource root given a sample rate. 569 // Returns file name relative to the resource root given a sample rate.
570 std::string GetFileName(int sample_rate) { 570 std::string GetFileName(int sample_rate) {
571 EXPECT_TRUE(sample_rate == 48000 || sample_rate == 44100); 571 EXPECT_TRUE(sample_rate == 48000 || sample_rate == 44100);
572 char fname[64]; 572 char fname[64];
573 snprintf(fname, 573 snprintf(fname,
574 sizeof(fname), 574 sizeof(fname),
575 "audio_device/audio_short%d", 575 "audio_device/audio_short%d",
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 StopPlayout(); 1009 StopPlayout();
1010 StopRecording(); 1010 StopRecording();
1011 // Verify that the correct number of transmitted impulses are detected. 1011 // Verify that the correct number of transmitted impulses are detected.
1012 EXPECT_EQ(latency_audio_stream->num_latency_values(), 1012 EXPECT_EQ(latency_audio_stream->num_latency_values(),
1013 static_cast<size_t>( 1013 static_cast<size_t>(
1014 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); 1014 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1));
1015 latency_audio_stream->PrintResults(); 1015 latency_audio_stream->PrintResults();
1016 } 1016 }
1017 1017
1018 } // namespace webrtc 1018 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_device/android/audio_record_jni.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698