Rename timeUs to currentTimeUs

This is a non-functional refactor.

PiperOrigin-RevId: 684408479
This commit is contained in:
ivanbuper 2024-10-10 05:33:01 -07:00 committed by Copybara-Service
parent cbc0ee369f
commit 3818e103e6

View File

@ -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,