chromium/third_party/blink/renderer/platform/audio/pffft/fft_frame_pffft.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#if defined(WTF_USE_WEBAUDIO_PFFFT)

#include "third_party/blink/renderer/platform/audio/fft_frame.h"

#include "base/synchronization/lock.h"
#include "third_party/blink/renderer/platform/audio/audio_array.h"
#include "third_party/blink/renderer/platform/audio/hrtf_panner.h"
#include "third_party/blink/renderer/platform/audio/vector_math.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
#include "third_party/pffft/src/pffft.h"
namespace blink {

// Not really clear what the largest size of FFT PFFFT supports, but the docs
// indicate it can go up to at least 1048576 (order 20).  Since we're using
// single-floats, accuracy decreases quite a bit at that size.  Plus we only
// need 32K (order 15) for WebAudio.
const unsigned kMaxFFTPow2Size =;

// PFFFT has a minimum real FFT order of 5 (32-point transforms).
const unsigned kMinFFTPow2Size =;

FFTFrame::FFTSetup::FFTSetup(unsigned fft_size) {}

FFTFrame::FFTSetup::~FFTSetup() {}

HashMap<unsigned, std::unique_ptr<FFTFrame::FFTSetup>>& FFTFrame::FFTSetups() {}

void FFTFrame::InitializeFFTSetupForSize(wtf_size_t fft_size) {}

PFFFT_Setup* FFTFrame::FFTSetupForSize(wtf_size_t fft_size) {}

FFTFrame::FFTFrame(unsigned fft_size)
    :{}

// Creates a blank/empty frame (interpolate() must later be called).
FFTFrame::FFTFrame() :{}

// Copy constructor.
FFTFrame::FFTFrame(const FFTFrame& frame)
    :{}

unsigned FFTFrame::MinFFTSize() {}

unsigned FFTFrame::MaxFFTSize() {}

void FFTFrame::Initialize(float sample_rate) {}

void FFTFrame::Cleanup() {}

FFTFrame::~FFTFrame() {}

void FFTFrame::DoFFT(const float* data) {}

void FFTFrame::DoInverseFFT(float* data) {}

}  // namespace blink

#endif  // #if defined(WTF_USE_WEBAUDIO_PFFFT)