mirror of
https://github.com/androidx/media.git
synced 2025-05-10 00:59:51 +08:00
Use EMPTY_BUFFER in SpeedChangingAudioProcessorTest.
PiperOrigin-RevId: 504264862
This commit is contained in:
parent
fb074e1823
commit
7abbd6aa1f
@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2.transformer;
|
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.android.exoplayer2.util.Assertions.checkArgument;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
|
|
||||||
@ -371,8 +372,7 @@ public class SpeedChangingAudioProcessorTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static ByteBuffer getAudioProcessorOutput(AudioProcessor audioProcessor) {
|
private static ByteBuffer getAudioProcessorOutput(AudioProcessor audioProcessor) {
|
||||||
ByteBuffer concatenatedOutputBuffers =
|
ByteBuffer concatenatedOutputBuffers = EMPTY_BUFFER;
|
||||||
ByteBuffer.allocateDirect(0).order(ByteOrder.nativeOrder());
|
|
||||||
while (true) {
|
while (true) {
|
||||||
ByteBuffer outputBuffer = audioProcessor.getOutput();
|
ByteBuffer outputBuffer = audioProcessor.getOutput();
|
||||||
if (!outputBuffer.hasRemaining()) {
|
if (!outputBuffer.hasRemaining()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user