| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 TEST_F(AudioManagerTest, IsLowLatencyRecordSupported) { | 129 TEST_F(AudioManagerTest, IsLowLatencyRecordSupported) { |
| 130 PRINT("%sLow latency input support: %s\n", kTag, | 130 PRINT("%sLow latency input support: %s\n", kTag, |
| 131 audio_manager()->IsLowLatencyRecordSupported() ? "Yes" : "No"); | 131 audio_manager()->IsLowLatencyRecordSupported() ? "Yes" : "No"); |
| 132 } | 132 } |
| 133 | 133 |
| 134 TEST_F(AudioManagerTest, IsProAudioSupported) { | 134 TEST_F(AudioManagerTest, IsProAudioSupported) { |
| 135 PRINT("%sPro audio support: %s\n", kTag, | 135 PRINT("%sPro audio support: %s\n", kTag, |
| 136 audio_manager()->IsProAudioSupported() ? "Yes" : "No"); | 136 audio_manager()->IsProAudioSupported() ? "Yes" : "No"); |
| 137 } | 137 } |
| 138 | 138 |
| 139 // Verify that playout side is configured for mono by default. |
| 140 TEST_F(AudioManagerTest, IsStereoPlayoutSupported) { |
| 141 EXPECT_FALSE(audio_manager()->IsStereoPlayoutSupported()); |
| 142 } |
| 143 |
| 144 // Verify that recording side is configured for mono by default. |
| 145 TEST_F(AudioManagerTest, IsStereoRecordSupported) { |
| 146 EXPECT_FALSE(audio_manager()->IsStereoRecordSupported()); |
| 147 } |
| 148 |
| 139 TEST_F(AudioManagerTest, ShowAudioParameterInfo) { | 149 TEST_F(AudioManagerTest, ShowAudioParameterInfo) { |
| 140 const bool low_latency_out = audio_manager()->IsLowLatencyPlayoutSupported(); | 150 const bool low_latency_out = audio_manager()->IsLowLatencyPlayoutSupported(); |
| 141 const bool low_latency_in = audio_manager()->IsLowLatencyRecordSupported(); | 151 const bool low_latency_in = audio_manager()->IsLowLatencyRecordSupported(); |
| 142 PRINT("PLAYOUT:\n"); | 152 PRINT("PLAYOUT:\n"); |
| 143 PRINT("%saudio layer: %s\n", kTag, | 153 PRINT("%saudio layer: %s\n", kTag, |
| 144 low_latency_out ? "Low latency OpenSL" : "Java/JNI based AudioTrack"); | 154 low_latency_out ? "Low latency OpenSL" : "Java/JNI based AudioTrack"); |
| 145 PRINT("%ssample rate: %d Hz\n", kTag, playout_parameters_.sample_rate()); | 155 PRINT("%ssample rate: %d Hz\n", kTag, playout_parameters_.sample_rate()); |
| 146 PRINT("%schannels: %" PRIuS "\n", kTag, playout_parameters_.channels()); | 156 PRINT("%schannels: %" PRIuS "\n", kTag, playout_parameters_.channels()); |
| 147 PRINT("%sframes per buffer: %" PRIuS " <=> %.2f ms\n", kTag, | 157 PRINT("%sframes per buffer: %" PRIuS " <=> %.2f ms\n", kTag, |
| 148 playout_parameters_.frames_per_buffer(), | 158 playout_parameters_.frames_per_buffer(), |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 params.frames_per_10ms_buffer()); | 232 params.frames_per_10ms_buffer()); |
| 223 EXPECT_EQ(kBytesPerFrame, params.GetBytesPerFrame()); | 233 EXPECT_EQ(kBytesPerFrame, params.GetBytesPerFrame()); |
| 224 EXPECT_EQ(kBytesPerFrame * kFramesPerBuffer, params.GetBytesPerBuffer()); | 234 EXPECT_EQ(kBytesPerFrame * kFramesPerBuffer, params.GetBytesPerBuffer()); |
| 225 EXPECT_EQ(kBytesPerFrame * kFramesPer10msBuffer, | 235 EXPECT_EQ(kBytesPerFrame * kFramesPer10msBuffer, |
| 226 params.GetBytesPer10msBuffer()); | 236 params.GetBytesPer10msBuffer()); |
| 227 EXPECT_EQ(kBufferSizeInMs, params.GetBufferSizeInMilliseconds()); | 237 EXPECT_EQ(kBufferSizeInMs, params.GetBufferSizeInMilliseconds()); |
| 228 } | 238 } |
| 229 | 239 |
| 230 } // namespace webrtc | 240 } // namespace webrtc |
| 231 | 241 |
| OLD | NEW |