Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1620)

Unified Diff: webrtc/sdk/android/api/org/webrtc/AudioTrack.java

Issue 2710683009: Added support for changing the volume of AudioTrack as discussed in BUG=webrtc:6533 (Closed)
Patch Set: fixed silly mistake in JNI converting twice Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | webrtc/sdk/android/src/jni/peerconnection_jni.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6b7135361042df095f8026aa72044a8e17915c14 100644
--- a/webrtc/sdk/android/api/org/webrtc/AudioTrack.java
+++ b/webrtc/sdk/android/api/org/webrtc/AudioTrack.java
@@ -15,4 +15,13 @@ public class AudioTrack extends MediaStreamTrack {
public AudioTrack(long nativeTrack) {
super(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(super.nativeTrack, volume);
+ }
+
+ private static native void nativeSetVolume(long nativeTrack, double volume);
}
« no previous file with comments | « AUTHORS ('k') | webrtc/sdk/android/src/jni/peerconnection_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698