OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // Interpolates from frame1 -> frame2 as x goes from 0.0 -> 1.0 | 95 // Interpolates from frame1 -> frame2 as x goes from 0.0 -> 1.0 |
96 static PassOwnPtr<FFTFrame> createInterpolatedFrame(const FFTFrame& frame1,
const FFTFrame& frame2, double x); | 96 static PassOwnPtr<FFTFrame> createInterpolatedFrame(const FFTFrame& frame1,
const FFTFrame& frame2, double x); |
97 | 97 |
98 void doPaddedFFT(const float* data, size_t dataSize); // zero-padding with d
ataSize <= fftSize | 98 void doPaddedFFT(const float* data, size_t dataSize); // zero-padding with d
ataSize <= fftSize |
99 double extractAverageGroupDelay(); | 99 double extractAverageGroupDelay(); |
100 void addConstantGroupDelay(double sampleFrameDelay); | 100 void addConstantGroupDelay(double sampleFrameDelay); |
101 | 101 |
102 unsigned fftSize() const { return m_FFTSize; } | 102 unsigned fftSize() const { return m_FFTSize; } |
103 unsigned log2FFTSize() const { return m_log2FFTSize; } | 103 unsigned log2FFTSize() const { return m_log2FFTSize; } |
104 | 104 |
105 void reportMemoryUsage(MemoryObjectInfo*) const; | |
106 | |
107 private: | 105 private: |
108 unsigned m_FFTSize; | 106 unsigned m_FFTSize; |
109 unsigned m_log2FFTSize; | 107 unsigned m_log2FFTSize; |
110 | 108 |
111 void interpolateFrequencyComponents(const FFTFrame& frame1, const FFTFrame&
frame2, double x); | 109 void interpolateFrequencyComponents(const FFTFrame& frame1, const FFTFrame&
frame2, double x); |
112 | 110 |
113 #if USE_ACCELERATE_FFT | 111 #if USE_ACCELERATE_FFT |
114 DSPSplitComplex& dspSplitComplex() { return m_frame; } | 112 DSPSplitComplex& dspSplitComplex() { return m_frame; } |
115 DSPSplitComplex dspSplitComplex() const { return m_frame; } | 113 DSPSplitComplex dspSplitComplex() const { return m_frame; } |
116 | 114 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 AudioFloatArray m_realData; | 173 AudioFloatArray m_realData; |
176 AudioFloatArray m_imagData; | 174 AudioFloatArray m_imagData; |
177 #endif | 175 #endif |
178 | 176 |
179 #endif // !USE_ACCELERATE_FFT | 177 #endif // !USE_ACCELERATE_FFT |
180 }; | 178 }; |
181 | 179 |
182 } // namespace WebCore | 180 } // namespace WebCore |
183 | 181 |
184 #endif // FFTFrame_h | 182 #endif // FFTFrame_h |
OLD | NEW |