bug 1188704 combine scaling with copying r=rillian

--HG--
extra : rebase_source : f30aed44b66cca842a752a207ab9536e3cb395b2
This commit is contained in:
Karl Tomlinson 2015-07-28 15:58:06 +12:00
Родитель 893dc9cca8
Коммит 6ca6918802
1 изменённых файлов: 1 добавлений и 4 удалений

Просмотреть файл

@ -203,12 +203,9 @@ void PeriodicWave::createBandLimitedTables(const float* realData, const float* i
// Copy from loaded frequency data and scale.
float scale = fftSize;
AudioBufferCopyWithScale(realData, scale, realP, numberOfPartials + 1);
AudioBufferCopyWithScale(imagData, scale, imagP, numberOfPartials + 1);
// Generate complex conjugate because of the way the
// inverse FFT is defined.
float minusOne = -1;
AudioBufferInPlaceScale(imagP, minusOne, numberOfPartials + 1);
AudioBufferCopyWithScale(imagData, -scale, imagP, numberOfPartials + 1);
// Clear the remaining bins.
for (i = numberOfPartials + 1; i < halfSize + 1; ++i) {