| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "media/audio/android/audio_manager_android.h" | 5 #include "media/audio/android/audio_manager_android.h" |
| 6 | 6 |
| 7 #include "base/android/build_info.h" | 7 #include "base/android/build_info.h" |
| 8 #include "base/android/context_utils.h" | 8 #include "base/android/context_utils.h" |
| 9 #include "base/android/jni_array.h" | 9 #include "base/android/jni_array.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| 11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
| 15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 16 #include "jni/AudioManagerAndroid_jni.h" | 16 #include "jni/AudioManagerAndroid_jni.h" |
| 17 #include "media/audio/android/audio_record_input.h" | 17 #include "media/audio/android/audio_record_input.h" |
| 18 #include "media/audio/android/opensles_input.h" | 18 #include "media/audio/android/opensles_input.h" |
| 19 #include "media/audio/android/opensles_output.h" | 19 #include "media/audio/android/opensles_output.h" |
| 20 #include "media/audio/audio_device_description.h" | 20 #include "media/audio/audio_device_description.h" |
| 21 #include "media/audio/audio_manager.h" | 21 #include "media/audio/audio_manager.h" |
| 22 #include "media/audio/fake_audio_input_stream.h" | 22 #include "media/audio/fake_audio_input_stream.h" |
| 23 #include "media/base/audio_parameters.h" | 23 #include "media/base/audio_parameters.h" |
| 24 #include "media/base/channel_layout.h" | 24 #include "media/base/channel_layout.h" |
| 25 | 25 |
| 26 using base::android::AppendJavaStringArrayToStringVector; | 26 using base::android::AppendJavaStringArrayToStringVector; |
| 27 using base::android::AttachCurrentThread; | 27 using base::android::AttachCurrentThread; |
| 28 using base::android::ConvertJavaStringToUTF8; | 28 using base::android::ConvertJavaStringToUTF8; |
| 29 using base::android::ConvertUTF8ToJavaString; | 29 using base::android::ConvertUTF8ToJavaString; |
| 30 using base::android::JavaParamRef; |
| 30 using base::android::ScopedJavaLocalRef; | 31 using base::android::ScopedJavaLocalRef; |
| 31 | 32 |
| 32 namespace media { | 33 namespace media { |
| 33 namespace { | 34 namespace { |
| 34 | 35 |
| 35 void AddDefaultDevice(AudioDeviceNames* device_names) { | 36 void AddDefaultDevice(AudioDeviceNames* device_names) { |
| 36 DCHECK(device_names->empty()); | 37 DCHECK(device_names->empty()); |
| 37 device_names->push_front(AudioDeviceName::CreateDefault()); | 38 device_names->push_front(AudioDeviceName::CreateDefault()); |
| 38 } | 39 } |
| 39 | 40 |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 output_volume_override_ = volume; | 424 output_volume_override_ = volume; |
| 424 | 425 |
| 425 DCHECK(GetTaskRunner()->BelongsToCurrentThread()); | 426 DCHECK(GetTaskRunner()->BelongsToCurrentThread()); |
| 426 for (OutputStreams::iterator it = streams_.begin(); | 427 for (OutputStreams::iterator it = streams_.begin(); |
| 427 it != streams_.end(); ++it) { | 428 it != streams_.end(); ++it) { |
| 428 (*it)->SetVolume(volume); | 429 (*it)->SetVolume(volume); |
| 429 } | 430 } |
| 430 } | 431 } |
| 431 | 432 |
| 432 } // namespace media | 433 } // namespace media |
| OLD | NEW |