mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b=989907 initialize AudioNodeExternalInputStream output chunk even when first track has null output r=roc
--HG-- extra : transplant_source : %96%C3%A3%DCs%D3%CCY6.%CC%07%22%02%EDy%A5%94U%DD
This commit is contained in:
parent
b33bfca306
commit
40fbb14dfc
@ -437,17 +437,22 @@ AudioNodeExternalInputStream::ProcessInput(GraphTime aFrom, GraphTime aTo,
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t accumulateIndex = 0;
|
||||
if (inputChannels) {
|
||||
AllocateAudioBlock(inputChannels, &mLastChunks[0]);
|
||||
nsAutoTArray<float,GUESS_AUDIO_CHANNELS*WEBAUDIO_BLOCK_SIZE> downmixBuffer;
|
||||
for (uint32_t i = 0; i < audioSegments.Length(); ++i) {
|
||||
AudioChunk tmpChunk;
|
||||
ConvertSegmentToAudioBlock(&audioSegments[i], &tmpChunk);
|
||||
if (!tmpChunk.IsNull()) {
|
||||
AccumulateInputChunk(i, tmpChunk, &mLastChunks[0], &downmixBuffer);
|
||||
if (accumulateIndex == 0) {
|
||||
AllocateAudioBlock(inputChannels, &mLastChunks[0]);
|
||||
}
|
||||
AccumulateInputChunk(accumulateIndex, tmpChunk, &mLastChunks[0], &downmixBuffer);
|
||||
accumulateIndex++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
if (accumulateIndex == 0) {
|
||||
mLastChunks[0].SetNull(WEBAUDIO_BLOCK_SIZE);
|
||||
}
|
||||
mCurrentOutputPosition += WEBAUDIO_BLOCK_SIZE;
|
||||
|
Loading…
Reference in New Issue
Block a user