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

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

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« 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 25 matching lines...) Expand all
36 36
37 #ifndef NDEBUG 37 #ifndef NDEBUG
38 #include <stdio.h> 38 #include <stdio.h>
39 #endif 39 #endif
40 40
41 #include "platform/Logging.h" 41 #include "platform/Logging.h"
42 #include "wtf/Complex.h" 42 #include "wtf/Complex.h"
43 #include "wtf/MathExtras.h" 43 #include "wtf/MathExtras.h"
44 #include "wtf/OwnPtr.h" 44 #include "wtf/OwnPtr.h"
45 45
46 namespace WebCore { 46 namespace blink {
47 47
48 void FFTFrame::doPaddedFFT(const float* data, size_t dataSize) 48 void FFTFrame::doPaddedFFT(const float* data, size_t dataSize)
49 { 49 {
50 // Zero-pad the impulse response 50 // Zero-pad the impulse response
51 AudioFloatArray paddedResponse(fftSize()); // zero-initialized 51 AudioFloatArray paddedResponse(fftSize()); // zero-initialized
52 paddedResponse.copyToRange(data, 0, dataSize); 52 paddedResponse.copyToRange(data, 0, dataSize);
53 53
54 // Get the frequency-domain version of padded response 54 // Get the frequency-domain version of padded response
55 doFFT(paddedResponse.data()); 55 doFFT(paddedResponse.data());
56 } 56 }
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 for (int i = 1; i < n; i++) { 285 for (int i = 1; i < n; i++) {
286 double mag = sqrt(realP[i] * realP[i] + imagP[i] * imagP[i]); 286 double mag = sqrt(realP[i] * realP[i] + imagP[i] * imagP[i]);
287 double phase = atan2(realP[i], imagP[i]); 287 double phase = atan2(realP[i], imagP[i]);
288 288
289 WTF_LOG(WebAudio, "[%d] (%f %f)\n", i, mag, phase); 289 WTF_LOG(WebAudio, "[%d] (%f %f)\n", i, mag, phase);
290 } 290 }
291 WTF_LOG(WebAudio, "****\n"); 291 WTF_LOG(WebAudio, "****\n");
292 } 292 }
293 #endif // NDEBUG 293 #endif // NDEBUG
294 294
295 } // namespace WebCore 295 } // namespace blink
296 296
297 #endif // ENABLE(WEB_AUDIO) 297 #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