OLD | NEW |
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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 return static_cast<AudioDeviceModuleImpl*>(audio_device_.get()); | 530 return static_cast<AudioDeviceModuleImpl*>(audio_device_.get()); |
531 } | 531 } |
532 | 532 |
533 AudioDeviceBuffer* audio_device_buffer() const { | 533 AudioDeviceBuffer* audio_device_buffer() const { |
534 return audio_device_impl()->GetAudioDeviceBuffer(); | 534 return audio_device_impl()->GetAudioDeviceBuffer(); |
535 } | 535 } |
536 | 536 |
537 rtc::scoped_refptr<AudioDeviceModule> CreateAudioDevice( | 537 rtc::scoped_refptr<AudioDeviceModule> CreateAudioDevice( |
538 AudioDeviceModule::AudioLayer audio_layer) { | 538 AudioDeviceModule::AudioLayer audio_layer) { |
539 rtc::scoped_refptr<AudioDeviceModule> module( | 539 rtc::scoped_refptr<AudioDeviceModule> module( |
540 AudioDeviceModuleImpl::Create(0, audio_layer)); | 540 AudioDeviceModule::Create(0, audio_layer)); |
541 return module; | 541 return module; |
542 } | 542 } |
543 | 543 |
544 // Returns file name relative to the resource root given a sample rate. | 544 // Returns file name relative to the resource root given a sample rate. |
545 std::string GetFileName(int sample_rate) { | 545 std::string GetFileName(int sample_rate) { |
546 EXPECT_TRUE(sample_rate == 48000 || sample_rate == 44100 || | 546 EXPECT_TRUE(sample_rate == 48000 || sample_rate == 44100 || |
547 sample_rate == 16000); | 547 sample_rate == 16000); |
548 char fname[64]; | 548 char fname[64]; |
549 snprintf(fname, sizeof(fname), "audio_device/audio_short%d", | 549 snprintf(fname, sizeof(fname), "audio_device/audio_short%d", |
550 sample_rate / 1000); | 550 sample_rate / 1000); |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 StopPlayout(); | 838 StopPlayout(); |
839 StopRecording(); | 839 StopRecording(); |
840 // Verify that the correct number of transmitted impulses are detected. | 840 // Verify that the correct number of transmitted impulses are detected. |
841 EXPECT_EQ(latency_audio_stream->num_latency_values(), | 841 EXPECT_EQ(latency_audio_stream->num_latency_values(), |
842 static_cast<size_t>( | 842 static_cast<size_t>( |
843 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); | 843 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); |
844 latency_audio_stream->PrintResults(); | 844 latency_audio_stream->PrintResults(); |
845 } | 845 } |
846 | 846 |
847 } // namespace webrtc | 847 } // namespace webrtc |
OLD | NEW |