| 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 29 matching lines...) Expand all Loading... |
| 40 // guarantees that no other (possibly non attached) thread is used. | 40 // guarantees that no other (possibly non attached) thread is used. |
| 41 class AudioTrackJni { | 41 class AudioTrackJni { |
| 42 public: | 42 public: |
| 43 // Wraps the Java specific parts of the AudioTrackJni into one helper class. | 43 // Wraps the Java specific parts of the AudioTrackJni into one helper class. |
| 44 class JavaAudioTrack { | 44 class JavaAudioTrack { |
| 45 public: | 45 public: |
| 46 JavaAudioTrack(NativeRegistration* native_registration, | 46 JavaAudioTrack(NativeRegistration* native_registration, |
| 47 std::unique_ptr<GlobalRef> audio_track); | 47 std::unique_ptr<GlobalRef> audio_track); |
| 48 ~JavaAudioTrack(); | 48 ~JavaAudioTrack(); |
| 49 | 49 |
| 50 void InitPlayout(int sample_rate, int channels); | 50 bool InitPlayout(int sample_rate, int channels); |
| 51 bool StartPlayout(); | 51 bool StartPlayout(); |
| 52 bool StopPlayout(); | 52 bool StopPlayout(); |
| 53 bool SetStreamVolume(int volume); | 53 bool SetStreamVolume(int volume); |
| 54 int GetStreamMaxVolume(); | 54 int GetStreamMaxVolume(); |
| 55 int GetStreamVolume(); | 55 int GetStreamVolume(); |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 std::unique_ptr<GlobalRef> audio_track_; | 58 std::unique_ptr<GlobalRef> audio_track_; |
| 59 jmethodID init_playout_; | 59 jmethodID init_playout_; |
| 60 jmethodID start_playout_; | 60 jmethodID start_playout_; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // Raw pointer handle provided to us in AttachAudioBuffer(). Owned by the | 146 // Raw pointer handle provided to us in AttachAudioBuffer(). Owned by the |
| 147 // AudioDeviceModuleImpl class and called by AudioDeviceModuleImpl::Create(). | 147 // AudioDeviceModuleImpl class and called by AudioDeviceModuleImpl::Create(). |
| 148 // The AudioDeviceBuffer is a member of the AudioDeviceModuleImpl instance | 148 // The AudioDeviceBuffer is a member of the AudioDeviceModuleImpl instance |
| 149 // and therefore outlives this object. | 149 // and therefore outlives this object. |
| 150 AudioDeviceBuffer* audio_device_buffer_; | 150 AudioDeviceBuffer* audio_device_buffer_; |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 } // namespace webrtc | 153 } // namespace webrtc |
| 154 | 154 |
| 155 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_TRACK_JNI_H_ | 155 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_TRACK_JNI_H_ |
| OLD | NEW |