Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: Source/platform/audio/FFTFrame.cpp

Issue 536843002: Change members's order and combine duplicated method for FFTFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Separated using VectorMatch::vsmul from FFTFrameMac.cpp Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/platform/audio/FFTFrame.h ('k') | Source/platform/audio/FFTFrameStub.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 15 matching lines...) Expand all
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "config.h" 29 #include "config.h"
30 30
31 #if ENABLE(WEB_AUDIO) 31 #if ENABLE(WEB_AUDIO)
32 32
33 #include "platform/audio/FFTFrame.h" 33 #include "platform/audio/FFTFrame.h"
34 34
35 #include "platform/audio/VectorMath.h" 35 #include "platform/audio/VectorMath.h"
36 #include "platform/Logging.h"
37 #include "wtf/Complex.h"
38 #include "wtf/MathExtras.h"
39 #include "wtf/OwnPtr.h"
36 40
37 #ifndef NDEBUG 41 #ifndef NDEBUG
38 #include <stdio.h> 42 #include <stdio.h>
39 #endif 43 #endif
40 44
41 #include "platform/Logging.h"
42 #include "wtf/Complex.h"
43 #include "wtf/MathExtras.h"
44 #include "wtf/OwnPtr.h"
45
46 namespace blink { 45 namespace blink {
47 46
48 void FFTFrame::doPaddedFFT(const float* data, size_t dataSize) 47 void FFTFrame::doPaddedFFT(const float* data, size_t dataSize)
49 { 48 {
50 // Zero-pad the impulse response 49 // Zero-pad the impulse response
51 AudioFloatArray paddedResponse(fftSize()); // zero-initialized 50 AudioFloatArray paddedResponse(fftSize()); // zero-initialized
52 paddedResponse.copyToRange(data, 0, dataSize); 51 paddedResponse.copyToRange(data, 0, dataSize);
53 52
54 // Get the frequency-domain version of padded response 53 // Get the frequency-domain version of padded response
55 doFFT(paddedResponse.data()); 54 doFFT(paddedResponse.data());
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 287
289 WTF_LOG(WebAudio, "[%d] (%f %f)\n", i, mag, phase); 288 WTF_LOG(WebAudio, "[%d] (%f %f)\n", i, mag, phase);
290 } 289 }
291 WTF_LOG(WebAudio, "****\n"); 290 WTF_LOG(WebAudio, "****\n");
292 } 291 }
293 #endif // NDEBUG 292 #endif // NDEBUG
294 293
295 } // namespace blink 294 } // namespace blink
296 295
297 #endif // ENABLE(WEB_AUDIO) 296 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/platform/audio/FFTFrame.h ('k') | Source/platform/audio/FFTFrameStub.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698