mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Rename timeUs
to currentTimeUs
This is a non-functional refactor. PiperOrigin-RevId: 684408479
This commit is contained in:
parent
cbc0ee369f
commit
3818e103e6
@ -115,23 +115,23 @@ public final class SpeedChangingAudioProcessor extends BaseAudioProcessor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void queueInput(ByteBuffer inputBuffer) {
|
public void queueInput(ByteBuffer inputBuffer) {
|
||||||
long timeUs =
|
long currentTimeUs =
|
||||||
Util.scaleLargeTimestamp(
|
Util.scaleLargeTimestamp(
|
||||||
/* timestamp= */ bytesRead,
|
/* timestamp= */ bytesRead,
|
||||||
/* multiplier= */ C.MICROS_PER_SECOND,
|
/* multiplier= */ C.MICROS_PER_SECOND,
|
||||||
/* divisor= */ (long) inputAudioFormat.sampleRate * inputAudioFormat.bytesPerFrame);
|
/* 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();
|
int inputBufferLimit = inputBuffer.limit();
|
||||||
long nextSpeedChangeTimeUs = speedProvider.getNextSpeedChangeTimeUs(timeUs);
|
long nextSpeedChangeTimeUs = speedProvider.getNextSpeedChangeTimeUs(currentTimeUs);
|
||||||
int bytesToNextSpeedChange;
|
int bytesToNextSpeedChange;
|
||||||
if (nextSpeedChangeTimeUs != C.TIME_UNSET) {
|
if (nextSpeedChangeTimeUs != C.TIME_UNSET) {
|
||||||
bytesToNextSpeedChange =
|
bytesToNextSpeedChange =
|
||||||
(int)
|
(int)
|
||||||
Util.scaleLargeValue(
|
Util.scaleLargeValue(
|
||||||
/* timestamp= */ nextSpeedChangeTimeUs - timeUs,
|
/* timestamp */ nextSpeedChangeTimeUs - currentTimeUs,
|
||||||
/* multiplier= */ (long) inputAudioFormat.sampleRate
|
/* multiplier= */ (long) inputAudioFormat.sampleRate
|
||||||
* inputAudioFormat.bytesPerFrame,
|
* inputAudioFormat.bytesPerFrame,
|
||||||
/* divisor= */ C.MICROS_PER_SECOND,
|
/* divisor= */ C.MICROS_PER_SECOND,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user