typedef AlignedTArray<float> AlignedAudioFloatArray; using mozilla::FFTBlock;
class FFTConvolver { public: // |fftSize| must be a power of two. // // |renderPhase| is the initial offset in the initially zero input buffer. // It is coordinated with the other stages, so they don't all do their // FFTs at the same time. explicit FFTConvolver(size_t fftSize, size_t renderPhase = 0);
// Process WEBAUDIO_BLOCK_SIZE elements of array |sourceP| and return a // pointer to an output array of the same size. // // |fftKernel| must be pre-scaled for FFTBlock::GetInverseWithoutScaling(). // // FIXME: Later, we can do more sophisticated buffering to relax this // requirement... constfloat* process(FFTBlock* fftKernel, constfloat* sourceP);
// The input to output latency is up to fftSize / 2, but alignment of the // FFTs with the blocks reduces this by one block.
size_t latencyFrames() const;
// Buffer input until we get fftSize / 2 samples then do an FFT
size_t m_readWriteIndex;
AlignedAudioFloatArray m_inputBuffer;
// Stores output which we read a little at a time
AlignedAudioFloatArray m_outputBuffer;
// Saves the 2nd half of the FFT buffer, so we can do an overlap-add with the // 1st half of the next one
AlignedAudioFloatArray m_lastOverlapBuffer;
};
} // namespace WebCore
#endif// FFTConvolver_h
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.