From 3818e103e6598dd0a222ace8e654f8730e1dd46a Mon Sep 17 00:00:00 2001 From: ivanbuper Date: Thu, 10 Oct 2024 05:33:01 -0700 Subject: [PATCH] Rename `timeUs` to `currentTimeUs` This is a non-functional refactor. PiperOrigin-RevId: 684408479 --- .../common/audio/SpeedChangingAudioProcessor.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/common/src/main/java/androidx/media3/common/audio/SpeedChangingAudioProcessor.java b/libraries/common/src/main/java/androidx/media3/common/audio/SpeedChangingAudioProcessor.java index ad59380d47..ba8d3caf16 100644 --- a/libraries/common/src/main/java/androidx/media3/common/audio/SpeedChangingAudioProcessor.java +++ b/libraries/common/src/main/java/androidx/media3/common/audio/SpeedChangingAudioProcessor.java @@ -115,23 +115,23 @@ public final class SpeedChangingAudioProcessor extends BaseAudioProcessor { @Override public void queueInput(ByteBuffer inputBuffer) { - long timeUs = + long currentTimeUs = Util.scaleLargeTimestamp( /* timestamp= */ bytesRead, /* multiplier= */ C.MICROS_PER_SECOND, /* divisor= */ (long) inputAudioFormat.sampleRate * inputAudioFormat.bytesPerFrame); - float newSpeed = speedProvider.getSpeed(timeUs); + float newSpeed = speedProvider.getSpeed(currentTimeUs); - updateSpeed(newSpeed, timeUs); + updateSpeed(newSpeed, currentTimeUs); int inputBufferLimit = inputBuffer.limit(); - long nextSpeedChangeTimeUs = speedProvider.getNextSpeedChangeTimeUs(timeUs); + long nextSpeedChangeTimeUs = speedProvider.getNextSpeedChangeTimeUs(currentTimeUs); int bytesToNextSpeedChange; if (nextSpeedChangeTimeUs != C.TIME_UNSET) { bytesToNextSpeedChange = (int) Util.scaleLargeValue( - /* timestamp= */ nextSpeedChangeTimeUs - timeUs, + /* timestamp */ nextSpeedChangeTimeUs - currentTimeUs, /* multiplier= */ (long) inputAudioFormat.sampleRate * inputAudioFormat.bytesPerFrame, /* divisor= */ C.MICROS_PER_SECOND,