From 766b9cd38599c9d7a5fab3b7155edab21cc642f8 Mon Sep 17 00:00:00 2001 From: samrobinson Date: Wed, 14 Sep 2022 13:54:06 +0000 Subject: [PATCH] Clarify the replaceOutputBuffer parameter because count is unclear. PiperOrigin-RevId: 474279220 (cherry picked from commit 3e0ad6d8042c9e6604c281e283885b9e07eb8786) --- .../android/exoplayer2/audio/BaseAudioProcessor.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/audio/BaseAudioProcessor.java b/library/core/src/main/java/com/google/android/exoplayer2/audio/BaseAudioProcessor.java index 41cb436504..ff17be48e9 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/audio/BaseAudioProcessor.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/audio/BaseAudioProcessor.java @@ -101,13 +101,13 @@ public abstract class BaseAudioProcessor implements AudioProcessor { } /** - * Replaces the current output buffer with a buffer of at least {@code count} bytes and returns - * it. Callers should write to the returned buffer then {@link ByteBuffer#flip()} it so it can be - * read via {@link #getOutput()}. + * Replaces the current output buffer with a buffer of at least {@code size} bytes and returns it. + * Callers should write to the returned buffer then {@link ByteBuffer#flip()} it so it can be read + * via {@link #getOutput()}. */ - protected final ByteBuffer replaceOutputBuffer(int count) { - if (buffer.capacity() < count) { - buffer = ByteBuffer.allocateDirect(count).order(ByteOrder.nativeOrder()); + protected final ByteBuffer replaceOutputBuffer(int size) { + if (buffer.capacity() < size) { + buffer = ByteBuffer.allocateDirect(size).order(ByteOrder.nativeOrder()); } else { buffer.clear(); }