mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 01:08:21 +00:00
Bug 1270055 - Unaligned buffer used in DynamicsCompressor; r=padenot
MozReview-Commit-ID: 4xVYjCGblTV --HG-- extra : rebase_source : 28400783fa926ebc2832529e32688033e3420e3c
This commit is contained in:
parent
d9348654ed
commit
68f5130961
@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
#include "DynamicsCompressor.h"
|
||||
#include "AlignmentUtils.h"
|
||||
#include "AudioBlock.h"
|
||||
|
||||
#include <cmath>
|
||||
@ -198,7 +199,9 @@ void DynamicsCompressor::process(const AudioBlock* sourceChunk, AudioBlock* dest
|
||||
setEmphasisParameters(filterStageGain, anchor, filterStageRatio);
|
||||
}
|
||||
|
||||
float sourceWithVolume[WEBAUDIO_BLOCK_SIZE];
|
||||
float sourceWithVolume[WEBAUDIO_BLOCK_SIZE + 4];
|
||||
float* alignedSourceWithVolume = ALIGNED16(sourceWithVolume);
|
||||
ASSERT_ALIGNED16(alignedSourceWithVolume);
|
||||
|
||||
// Apply pre-emphasis filter.
|
||||
// Note that the final three stages are computed in-place in the destination buffer.
|
||||
@ -210,8 +213,8 @@ void DynamicsCompressor::process(const AudioBlock* sourceChunk, AudioBlock* dest
|
||||
} else {
|
||||
AudioBlockCopyChannelWithScale(m_sourceChannels[i],
|
||||
sourceChunk->mVolume,
|
||||
sourceWithVolume);
|
||||
sourceData = sourceWithVolume;
|
||||
alignedSourceWithVolume);
|
||||
sourceData = alignedSourceWithVolume;
|
||||
}
|
||||
|
||||
float* destinationData = m_destinationChannels[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user