henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 1 | /* |
kjellander | b24317b | 2016-02-10 07:54:43 -0800 | [diff] [blame] | 2 | * Copyright 2013 The WebRTC project authors. All Rights Reserved. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 3 | * |
kjellander | b24317b | 2016-02-10 07:54:43 -0800 | [diff] [blame] | 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 |
| 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.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | package org.webrtc; |
| 12 | |
| 13 | /** Java wrapper for a C++ AudioTrackInterface */ |
Magnus Jedvert | 84d8ae5 | 2017-12-20 15:12:10 +0100 | [diff] [blame] | 14 | @JNINamespace("webrtc::jni") |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 15 | public class AudioTrack extends MediaStreamTrack { |
| 16 | public AudioTrack(long nativeTrack) { |
| 17 | super(nativeTrack); |
| 18 | } |
dax | 9d65f39 | 2017-04-12 16:58:48 -0700 | [diff] [blame] | 19 | |
| 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 Jedvert | 84d8ae5 | 2017-12-20 15:12:10 +0100 | [diff] [blame] | 27 | private static native void nativeSetVolume(long track, double volume); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 28 | } |