mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
Bug 1606148 align ProcessBlocksOnPorts() Span parameter lengths with number of inputs and outputs r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D59190 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
598b67d831
commit
4d907bb120
@ -315,18 +315,14 @@ class AudioNodeEngine {
|
||||
|
||||
/**
|
||||
* Produce the next block of audio samples, given input samples in the aInput
|
||||
* array. There is one input sample per active port in aInput, in order.
|
||||
* array. There is one input sample per port in aInput, in order.
|
||||
* This is the multi-input/output version of ProcessBlock. Only one kind
|
||||
* of ProcessBlock is called on each node, depending on whether the
|
||||
* number of inputs and outputs are both 1 or not.
|
||||
* of ProcessBlock is called on each node. ProcessBlocksOnPorts() is called
|
||||
* instead of ProcessBlock() if either the number of inputs or the number of
|
||||
* outputs is greater than 1.
|
||||
*
|
||||
* aInput is always guaranteed to not contain more input AudioChunks than the
|
||||
* maximum number of inputs for the node. It is the responsibility of the
|
||||
* overrides of this function to make sure they will only add a maximum number
|
||||
* of AudioChunks to aOutput as advertized by the AudioNode implementation.
|
||||
* An engine may choose to produce fewer inputs than advertizes by the
|
||||
* corresponding AudioNode, in which case it will be interpreted as a channel
|
||||
* of silence.
|
||||
* The numbers of AudioBlocks in aInput and aOutput are always guaranteed to
|
||||
* match the numbers of inputs and outputs for the node.
|
||||
*/
|
||||
virtual void ProcessBlocksOnPorts(AudioNodeTrack* aTrack,
|
||||
Span<const AudioBlock> aInput,
|
||||
|
@ -522,8 +522,10 @@ void AudioNodeTrack::ProcessInput(GraphTime aFrom, GraphTime aTo,
|
||||
mEngine->ProcessBlock(this, aFrom, mInputChunks[0], &mLastChunks[0],
|
||||
&finished);
|
||||
} else {
|
||||
mEngine->ProcessBlocksOnPorts(this, mInputChunks, mLastChunks,
|
||||
&finished);
|
||||
mEngine->ProcessBlocksOnPorts(
|
||||
this, MakeSpan(mInputChunks.Elements(), mEngine->InputCount()),
|
||||
MakeSpan(mLastChunks.Elements(), mEngine->OutputCount()),
|
||||
&finished);
|
||||
}
|
||||
}
|
||||
for (uint16_t i = 0; i < outputCount; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user