Use EMPTY_BUFFER in SpeedChangingAudioProcessorTest.

PiperOrigin-RevId: 504264862
This commit is contained in:
samrobinson 2023-01-24 15:07:55 +00:00 committed by christosts
parent fb074e1823
commit 7abbd6aa1f

View File

@ -15,6 +15,7 @@
*/
package com.google.android.exoplayer2.transformer;
import static com.google.android.exoplayer2.audio.AudioProcessor.EMPTY_BUFFER;
import static com.google.android.exoplayer2.util.Assertions.checkArgument;
import static com.google.common.truth.Truth.assertThat;
@ -371,8 +372,7 @@ public class SpeedChangingAudioProcessorTest {
}
private static ByteBuffer getAudioProcessorOutput(AudioProcessor audioProcessor) {
ByteBuffer concatenatedOutputBuffers =
ByteBuffer.allocateDirect(0).order(ByteOrder.nativeOrder());
ByteBuffer concatenatedOutputBuffers = EMPTY_BUFFER;
while (true) {
ByteBuffer outputBuffer = audioProcessor.getOutput();
if (!outputBuffer.hasRemaining()) {