mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Make sure the AudioProcessors do not receive AP.EMPTY_BUFFER
PiperOrigin-RevId: 489174645
This commit is contained in:
parent
f658fe79b1
commit
8a4f72b959
1 changed files with 7 additions and 0 deletions
|
|
@ -323,6 +323,13 @@ public final class AudioProcessingPipeline {
|
|||
index > 0
|
||||
? outputBuffers[index - 1]
|
||||
: inputBuffer.hasRemaining() ? inputBuffer : EMPTY_BUFFER;
|
||||
if (input == AudioProcessor.EMPTY_BUFFER) {
|
||||
// TODO(internal b/198772621): compare to how it was done in DefaultAudioSink to make sure
|
||||
// this is not unnecessarily complicated.
|
||||
// Queueing AudioProcessor.EMPTY_BUFFER to an AudioProcessor might lead to unexpected
|
||||
// behaviour (see [Internal: b/259393434]).
|
||||
input = EMPTY_BUFFER;
|
||||
}
|
||||
long inputBytes = input.remaining();
|
||||
audioProcessor.queueInput(input);
|
||||
outputBuffers[index] = audioProcessor.getOutput();
|
||||
|
|
|
|||
Loading…
Reference in a new issue