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

Side by Side Diff: Source/modules/webaudio/RealtimeAnalyser.cpp

Issue 1233173002: Have ScriptPromiseResolver on the Oilpan heap always. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix webusb ScriptPromiseResolver usage Created 5 years, 4 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
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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 19 matching lines...) Expand all
30 #include "platform/audio/AudioUtilities.h" 30 #include "platform/audio/AudioUtilities.h"
31 #include "platform/audio/VectorMath.h" 31 #include "platform/audio/VectorMath.h"
32 #include "wtf/MainThread.h" 32 #include "wtf/MainThread.h"
33 #include "wtf/MathExtras.h" 33 #include "wtf/MathExtras.h"
34 #include <algorithm> 34 #include <algorithm>
35 #include <complex> 35 #include <complex>
36 #include <limits.h> 36 #include <limits.h>
37 37
38 namespace blink { 38 namespace blink {
39 39
40 const double RealtimeAnalyser::DefaultSmoothingTimeConstant = 0.8; 40 const double RealtimeAnalyser::DefaultSmoothingTimeConstant = 0.8;
41 const double RealtimeAnalyser::DefaultMinDecibels = -100; 41 const double RealtimeAnalyser::DefaultMinDecibels = -100;
42 const double RealtimeAnalyser::DefaultMaxDecibels = -30; 42 const double RealtimeAnalyser::DefaultMaxDecibels = -30;
43 43
44 const unsigned RealtimeAnalyser::DefaultFFTSize = 2048; 44 const unsigned RealtimeAnalyser::DefaultFFTSize = 2048;
45 // All FFT implementations are expected to handle power-of-two sizes MinFFTSize <= size <= MaxFFTSize. 45 // All FFT implementations are expected to handle power-of-two sizes MinFFTSize <= size <= MaxFFTSize.
46 const unsigned RealtimeAnalyser::MinFFTSize = 32; 46 const unsigned RealtimeAnalyser::MinFFTSize = 32;
47 const unsigned RealtimeAnalyser::MaxFFTSize = 32768; 47 const unsigned RealtimeAnalyser::MaxFFTSize = 32768;
48 const unsigned RealtimeAnalyser::InputBufferSize = RealtimeAnalyser::MaxFFTSize * 2; 48 const unsigned RealtimeAnalyser::InputBufferSize = RealtimeAnalyser::MaxFFTSize * 2;
49 49
50 RealtimeAnalyser::RealtimeAnalyser() 50 RealtimeAnalyser::RealtimeAnalyser()
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 scaledValue = UCHAR_MAX; 312 scaledValue = UCHAR_MAX;
313 313
314 destination[i] = static_cast<unsigned char>(scaledValue); 314 destination[i] = static_cast<unsigned char>(scaledValue);
315 } 315 }
316 } 316 }
317 } 317 }
318 318
319 } // namespace blink 319 } // namespace blink
320 320
321 #endif // ENABLE(WEB_AUDIO) 321 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioContext.cpp ('k') | Source/modules/webmidi/MIDIAccessInitializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698