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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/AudioTrack.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright 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 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 1192
1193 JOW(void, PeerConnectionFactory_stopInternalTracingCapture)( 1193 JOW(void, PeerConnectionFactory_stopInternalTracingCapture)(
1194 JNIEnv* jni, jclass) { 1194 JNIEnv* jni, jclass) {
1195 rtc::tracing::StopInternalCapture(); 1195 rtc::tracing::StopInternalCapture();
1196 } 1196 }
1197 1197
1198 JOW(void, PeerConnectionFactory_shutdownInternalTracer)(JNIEnv* jni, jclass) { 1198 JOW(void, PeerConnectionFactory_shutdownInternalTracer)(JNIEnv* jni, jclass) {
1199 rtc::tracing::ShutdownInternalTracer(); 1199 rtc::tracing::ShutdownInternalTracer();
1200 } 1200 }
1201 1201
1202 JOW(void, AudioTrack_nativeSetVolume)
1203 (JNIEnv*, jclass, jlong j_p, jdouble volume) {
1204 rtc::scoped_refptr<AudioSourceInterface> source(
1205 reinterpret_cast<AudioTrackInterface*>(j_p)->GetSource());
1206 source->SetVolume(volume);
1207 }
1208
1202 // Helper struct for working around the fact that CreatePeerConnectionFactory() 1209 // Helper struct for working around the fact that CreatePeerConnectionFactory()
1203 // comes in two flavors: either entirely automagical (constructing its own 1210 // comes in two flavors: either entirely automagical (constructing its own
1204 // threads and deleting them on teardown, but no external codec factory support) 1211 // threads and deleting them on teardown, but no external codec factory support)
1205 // or entirely manual (requires caller to delete threads after factory 1212 // or entirely manual (requires caller to delete threads after factory
1206 // teardown). This struct takes ownership of its ctor's arguments to present a 1213 // teardown). This struct takes ownership of its ctor's arguments to present a
1207 // single thing for Java to hold and eventually free. 1214 // single thing for Java to hold and eventually free.
1208 class OwnedFactoryAndThreads { 1215 class OwnedFactoryAndThreads {
1209 public: 1216 public:
1210 OwnedFactoryAndThreads(std::unique_ptr<Thread> network_thread, 1217 OwnedFactoryAndThreads(std::unique_ptr<Thread> network_thread,
1211 std::unique_ptr<Thread> worker_thread, 1218 std::unique_ptr<Thread> worker_thread,
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
2727 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer) 2734 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)
2728 ->inter_tone_gap(); 2735 ->inter_tone_gap();
2729 } 2736 }
2730 2737
2731 JOW(void, DtmfSender_free) 2738 JOW(void, DtmfSender_free)
2732 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) { 2739 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) {
2733 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release(); 2740 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release();
2734 } 2741 }
2735 2742
2736 } // namespace webrtc_jni 2743 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/AudioTrack.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698