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}
This commit is contained in:
parent
d29b54c93a
commit
36636a2d6c
@ -221,7 +221,7 @@ public class WebRtcAudioTrack {
|
||||
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 @@ public class WebRtcAudioTrack {
|
||||
+ "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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user