blob: 6663666b40818a6721e682a4e5884a3b567ecb78 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001/*
kjellanderb24317b2016-02-10 07:54:43 -08002 * Copyright 2013 The WebRTC project authors. All Rights Reserved.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00003 *
kjellanderb24317b2016-02-10 07:54:43 -08004 * 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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00009 */
10
11package org.webrtc;
12
13/** Java wrapper for a C++ AudioTrackInterface */
Magnus Jedvert84d8ae52017-12-20 15:12:10 +010014@JNINamespace("webrtc::jni")
henrike@webrtc.org28e20752013-07-10 00:45:36 +000015public class AudioTrack extends MediaStreamTrack {
16 public AudioTrack(long nativeTrack) {
17 super(nativeTrack);
18 }
dax9d65f392017-04-12 16:58:48 -070019
20 /** Sets the volume for the underlying MediaSource. Volume is a gain value in the range
21 * 0 to 10.
22 */
23 public void setVolume(double volume) {
24 nativeSetVolume(super.nativeTrack, volume);
25 }
26
Magnus Jedvert84d8ae52017-12-20 15:12:10 +010027 private static native void nativeSetVolume(long track, double volume);
henrike@webrtc.org28e20752013-07-10 00:45:36 +000028}