OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 class JavaAudioRecord { | 48 class JavaAudioRecord { |
49 public: | 49 public: |
50 JavaAudioRecord(NativeRegistration* native_registration, | 50 JavaAudioRecord(NativeRegistration* native_registration, |
51 std::unique_ptr<GlobalRef> audio_track); | 51 std::unique_ptr<GlobalRef> audio_track); |
52 ~JavaAudioRecord(); | 52 ~JavaAudioRecord(); |
53 | 53 |
54 int InitRecording(int sample_rate, size_t channels); | 54 int InitRecording(int sample_rate, size_t channels); |
55 bool StartRecording(); | 55 bool StartRecording(); |
56 bool StopRecording(); | 56 bool StopRecording(); |
57 bool EnableBuiltInAEC(bool enable); | 57 bool EnableBuiltInAEC(bool enable); |
58 bool EnableBuiltInAGC(bool enable); | |
59 bool EnableBuiltInNS(bool enable); | 58 bool EnableBuiltInNS(bool enable); |
60 | 59 |
61 private: | 60 private: |
62 std::unique_ptr<GlobalRef> audio_record_; | 61 std::unique_ptr<GlobalRef> audio_record_; |
63 jmethodID init_recording_; | 62 jmethodID init_recording_; |
64 jmethodID start_recording_; | 63 jmethodID start_recording_; |
65 jmethodID stop_recording_; | 64 jmethodID stop_recording_; |
66 jmethodID enable_built_in_aec_; | 65 jmethodID enable_built_in_aec_; |
67 jmethodID enable_built_in_agc_; | |
68 jmethodID enable_built_in_ns_; | 66 jmethodID enable_built_in_ns_; |
69 }; | 67 }; |
70 | 68 |
71 explicit AudioRecordJni(AudioManager* audio_manager); | 69 explicit AudioRecordJni(AudioManager* audio_manager); |
72 ~AudioRecordJni(); | 70 ~AudioRecordJni(); |
73 | 71 |
74 int32_t Init(); | 72 int32_t Init(); |
75 int32_t Terminate(); | 73 int32_t Terminate(); |
76 | 74 |
77 int32_t InitRecording(); | 75 int32_t InitRecording(); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 bool recording_; | 154 bool recording_; |
157 | 155 |
158 // Raw pointer handle provided to us in AttachAudioBuffer(). Owned by the | 156 // Raw pointer handle provided to us in AttachAudioBuffer(). Owned by the |
159 // AudioDeviceModuleImpl class and called by AudioDeviceModule::Create(). | 157 // AudioDeviceModuleImpl class and called by AudioDeviceModule::Create(). |
160 AudioDeviceBuffer* audio_device_buffer_; | 158 AudioDeviceBuffer* audio_device_buffer_; |
161 }; | 159 }; |
162 | 160 |
163 } // namespace webrtc | 161 } // namespace webrtc |
164 | 162 |
165 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_RECORD_JNI_H_ | 163 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_RECORD_JNI_H_ |
OLD | NEW |