Removes StaticAccessedFromInstance warning in Android audio track.
Fixes the warning below:
WebRtcAudioTrack.java:364: warning: [StaticAccessedFromInstance] Static method getMaxVolume
should not be accessed from an object instance; instead use AudioTrack.getMaxVolume
+ "max gain: " + audioTrack.getMaxVolume());
Bug: NONE
Change-Id: I6247584b65ac972a6a3739fba718387873964f9f
Reviewed-on: https://webrtc-review.googlesource.com/14180
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20371}diff --git a/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java b/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java
index 26d8310..ae0217d 100644
--- a/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java
+++ b/modules/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java
@@ -221,7 +221,7 @@
private boolean initPlayout(int sampleRate, int channels) {
Logging.d(TAG, "initPlayout(sampleRate=" + sampleRate + ", channels=" + channels + ")");
final int bytesPerFrame = channels * (BITS_PER_SAMPLE / 8);
- byteBuffer = byteBuffer.allocateDirect(bytesPerFrame * (sampleRate / BUFFERS_PER_SECOND));
+ byteBuffer = ByteBuffer.allocateDirect(bytesPerFrame * (sampleRate / BUFFERS_PER_SECOND));
Logging.d(TAG, "byteBuffer.capacity: " + byteBuffer.capacity());
emptyBytes = new byte[byteBuffer.capacity()];
// Rather than passing the ByteBuffer with every callback (requiring
@@ -361,7 +361,7 @@
+ "channels: " + audioTrack.getChannelCount() + ", "
+ "sample rate: " + audioTrack.getSampleRate() + ", "
// Gain (>=1.0) expressed as linear multiplier on sample values.
- + "max gain: " + audioTrack.getMaxVolume());
+ + "max gain: " + AudioTrack.getMaxVolume());
}
// Creates and AudioTrack instance using AudioAttributes and AudioFormat as input.