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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/PeriodicWave.h

Issue 1670463002: [Oilpan] Unify memory usage reporters of Oilpan (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // The number of ranges needed for the given sampling rate and FFT size. 67 // The number of ranges needed for the given sampling rate and FFT size.
68 unsigned numberOfRanges() const { return m_numberOfRanges; } 68 unsigned numberOfRanges() const { return m_numberOfRanges; }
69 69
70 DEFINE_INLINE_TRACE() { } 70 DEFINE_INLINE_TRACE() { }
71 71
72 private: 72 private:
73 explicit PeriodicWave(float sampleRate); 73 explicit PeriodicWave(float sampleRate);
74 74
75 void generateBasicWaveform(int); 75 void generateBasicWaveform(int);
76 76
77 size_t m_v8ExternalMemory;
78
79 float m_sampleRate; 77 float m_sampleRate;
80 unsigned m_numberOfRanges; 78 unsigned m_numberOfRanges;
81 float m_centsPerRange; 79 float m_centsPerRange;
82 80
83 // The lowest frequency (in Hertz) where playback will include all of the pa rtials. 81 // The lowest frequency (in Hertz) where playback will include all of the pa rtials.
84 // Playing back lower than this frequency will gradually lose more high-freq uency information. 82 // Playing back lower than this frequency will gradually lose more high-freq uency information.
85 // This frequency is quite low (~10Hz @ 44.1KHz) 83 // This frequency is quite low (~10Hz @ 44.1KHz)
86 float m_lowestFundamentalFrequency; 84 float m_lowestFundamentalFrequency;
87 85
88 float m_rateScale; 86 float m_rateScale;
89 87
90 // Maximum possible number of partials (before culling). 88 // Maximum possible number of partials (before culling).
91 unsigned maxNumberOfPartials() const; 89 unsigned maxNumberOfPartials() const;
92 90
93 unsigned numberOfPartialsForRange(unsigned rangeIndex) const; 91 unsigned numberOfPartialsForRange(unsigned rangeIndex) const;
94 92
95 void adjustV8ExternalMemory(int delta);
96
97 // Creates tables based on numberOfComponents Fourier coefficients. 93 // Creates tables based on numberOfComponents Fourier coefficients.
98 void createBandLimitedTables(const float* real, const float* imag, unsigned numberOfComponents, bool disableNormalization); 94 void createBandLimitedTables(const float* real, const float* imag, unsigned numberOfComponents, bool disableNormalization);
99 Vector<OwnPtr<AudioFloatArray>> m_bandLimitedTables; 95 Vector<OwnPtr<AudioFloatArray>> m_bandLimitedTables;
100 }; 96 };
101 97
102 } // namespace blink 98 } // namespace blink
103 99
104 #endif // PeriodicWave_h 100 #endif // PeriodicWave_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698