mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Pass correct frame size for passthrough playback
When estimating the AudioTrack min buffer size, we must use a PCM frame of 1 when doing direct playback (passthrough). The code was passing -1 (C.LENGTH_UNSET). PiperOrigin-RevId: 489238392
This commit is contained in:
parent
d1b470e4cc
commit
07d25bf41d
1 changed files with 1 additions and 1 deletions
|
|
@ -707,7 +707,7 @@ public final class DefaultAudioSink implements AudioSink {
|
|||
getAudioTrackMinBufferSize(outputSampleRate, outputChannelConfig, outputEncoding),
|
||||
outputEncoding,
|
||||
outputMode,
|
||||
outputPcmFrameSize,
|
||||
outputPcmFrameSize != C.LENGTH_UNSET ? outputPcmFrameSize : 1,
|
||||
outputSampleRate,
|
||||
enableAudioTrackPlaybackParams ? MAX_PLAYBACK_SPEED : DEFAULT_PLAYBACK_SPEED);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue