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

Unified Diff: webrtc/sdk/android/src/jni/peerconnection_jni.cc

Issue 2710683009: Added support for changing the volume of AudioTrack as discussed in BUG=webrtc:6533 (Closed)
Patch Set: added period at end of sentence 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
Index: webrtc/sdk/android/src/jni/peerconnection_jni.cc
diff --git a/webrtc/sdk/android/src/jni/peerconnection_jni.cc b/webrtc/sdk/android/src/jni/peerconnection_jni.cc
index 75b1bad20256dcafd288b6a953d8e686c8a216ca..bff82e1f60f2fdb9a2a42b6f18703c6e4522654f 100644
--- a/webrtc/sdk/android/src/jni/peerconnection_jni.cc
+++ b/webrtc/sdk/android/src/jni/peerconnection_jni.cc
@@ -1199,6 +1199,16 @@ JOW(void, PeerConnectionFactory_shutdownInternalTracer)(JNIEnv* jni, jclass) {
rtc::tracing::ShutdownInternalTracer();
}
+JOW(void, AudioTrack_nativeSetVolume)
+(JNIEnv*, jclass, jlong j_p, jdouble volume) {
+ rtc::scoped_refptr<AudioSourceInterface> source(
+ reinterpret_cast<AudioTrackInterface*>(j_p)->GetSource());
+
+ jlong nativePointer = jlongFromPointer(source.get());
magjed_webrtc 2017/04/05 19:14:00 It looks like you are converting AudioSourceInterf
+
+ reinterpret_cast<AudioSourceInterface*>(nativePointer)->SetVolume(volume);
+}
+
// Helper struct for working around the fact that CreatePeerConnectionFactory()
// comes in two flavors: either entirely automagical (constructing its own
// threads and deleting them on teardown, but no external codec factory support)

Powered by Google App Engine
This is Rietveld 408576698