From bca9c9b280cb7d2cde52a3c86cc85af0e70e84ef 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 --- .../media3/exoplayer/audio/BaseAudioProcessor.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/BaseAudioProcessor.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/BaseAudioProcessor.java index 5eb504da45..acb7ba116c 100644 --- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/BaseAudioProcessor.java +++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/BaseAudioProcessor.java @@ -103,13 +103,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(); }