mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Switch argument order passed to scaleLargeTimestamp.
durationUs is almost always going to be a larger number than the sample rate, so pass as the main value, rather than the multiplier. PiperOrigin-RevId: 547193927
This commit is contained in:
parent
fcadecf2b1
commit
4983d4f339
1 changed files with 2 additions and 2 deletions
|
|
@ -53,8 +53,8 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||||
// overflow-safe multiplication & division.
|
// overflow-safe multiplication & division.
|
||||||
long outputFrameCount =
|
long outputFrameCount =
|
||||||
Util.scaleLargeTimestamp(
|
Util.scaleLargeTimestamp(
|
||||||
/* timestamp= */ audioFormat.sampleRate,
|
/* timestamp= */ durationUs,
|
||||||
/* multiplier= */ durationUs,
|
/* multiplier= */ audioFormat.sampleRate,
|
||||||
/* divisor= */ C.MICROS_PER_SECOND);
|
/* divisor= */ C.MICROS_PER_SECOND);
|
||||||
|
|
||||||
remainingBytesToOutput.addAndGet(audioFormat.bytesPerFrame * outputFrameCount);
|
remainingBytesToOutput.addAndGet(audioFormat.bytesPerFrame * outputFrameCount);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue