| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/android/build_info.h" | 5 #include "base/android/build_info.h" |
| 6 #include "base/basictypes.h" | 6 #include "base/basictypes.h" |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 // Converts AudioParameters::Format enumerator to readable string. | 54 // Converts AudioParameters::Format enumerator to readable string. |
| 55 static std::string FormatToString(AudioParameters::Format format) { | 55 static std::string FormatToString(AudioParameters::Format format) { |
| 56 switch (format) { | 56 switch (format) { |
| 57 case AudioParameters::AUDIO_PCM_LINEAR: | 57 case AudioParameters::AUDIO_PCM_LINEAR: |
| 58 return std::string("AUDIO_PCM_LINEAR"); | 58 return std::string("AUDIO_PCM_LINEAR"); |
| 59 case AudioParameters::AUDIO_PCM_LOW_LATENCY: | 59 case AudioParameters::AUDIO_PCM_LOW_LATENCY: |
| 60 return std::string("AUDIO_PCM_LOW_LATENCY"); | 60 return std::string("AUDIO_PCM_LOW_LATENCY"); |
| 61 case AudioParameters::AUDIO_FAKE: | 61 case AudioParameters::AUDIO_FAKE: |
| 62 return std::string("AUDIO_FAKE"); | 62 return std::string("AUDIO_FAKE"); |
| 63 case AudioParameters::AUDIO_LAST_FORMAT: | |
| 64 return std::string("AUDIO_LAST_FORMAT"); | |
| 65 default: | 63 default: |
| 66 return std::string(); | 64 return std::string(); |
| 67 } | 65 } |
| 68 } | 66 } |
| 69 | 67 |
| 70 // Converts ChannelLayout enumerator to readable string. Does not include | 68 // Converts ChannelLayout enumerator to readable string. Does not include |
| 71 // multi-channel cases since these layouts are not supported on Android. | 69 // multi-channel cases since these layouts are not supported on Android. |
| 72 static std::string LayoutToString(ChannelLayout channel_layout) { | 70 static std::string LayoutToString(ChannelLayout channel_layout) { |
| 73 switch (channel_layout) { | 71 switch (channel_layout) { |
| 74 case CHANNEL_LAYOUT_NONE: | 72 case CHANNEL_LAYOUT_NONE: |
| (...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20)); | 962 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20)); |
| 965 printf("\n"); | 963 printf("\n"); |
| 966 StopAndCloseAudioOutputStreamOnAudioThread(); | 964 StopAndCloseAudioOutputStreamOnAudioThread(); |
| 967 StopAndCloseAudioInputStreamOnAudioThread(); | 965 StopAndCloseAudioInputStreamOnAudioThread(); |
| 968 } | 966 } |
| 969 | 967 |
| 970 INSTANTIATE_TEST_CASE_P(AudioAndroidInputTest, AudioAndroidInputTest, | 968 INSTANTIATE_TEST_CASE_P(AudioAndroidInputTest, AudioAndroidInputTest, |
| 971 testing::ValuesIn(RunAudioRecordInputPathTests())); | 969 testing::ValuesIn(RunAudioRecordInputPathTests())); |
| 972 | 970 |
| 973 } // namespace media | 971 } // namespace media |
| OLD | NEW |