Chromium Code Reviews| Index: webrtc/sdk/android/api/org/webrtc/AudioTrack.java |
| diff --git a/webrtc/sdk/android/api/org/webrtc/AudioTrack.java b/webrtc/sdk/android/api/org/webrtc/AudioTrack.java |
| index c33a9d8db1d83aa1988520119361afc7284c414d..3ae9e6fdb5b705d28edab15d82b9653ef2f43010 100644 |
| --- a/webrtc/sdk/android/api/org/webrtc/AudioTrack.java |
| +++ b/webrtc/sdk/android/api/org/webrtc/AudioTrack.java |
| @@ -12,7 +12,19 @@ package org.webrtc; |
| /** Java wrapper for a C++ AudioTrackInterface */ |
| public class AudioTrack extends MediaStreamTrack { |
| + final long nativeTrack; |
|
magjed_webrtc
2017/04/05 19:14:00
No need to introduce a new member variable, just u
|
| + |
| public AudioTrack(long nativeTrack) { |
| super(nativeTrack); |
| + this.nativeTrack = nativeTrack; |
| + } |
| + |
| + /** Sets the volume for the underlying MediaSource. Volume is a gain value in the range |
| + * 0 to 10. |
| + */ |
| + public void setVolume(double volume) { |
| + nativeSetVolume(nativeTrack, volume); |
| } |
| + |
| + private static native void nativeSetVolume(long nativeTrack, double volume); |
| } |