Index: Source/modules/webaudio/PeriodicWave.h |
diff --git a/Source/modules/webaudio/WaveTable.h b/Source/modules/webaudio/PeriodicWave.h |
similarity index 77% |
rename from Source/modules/webaudio/WaveTable.h |
rename to Source/modules/webaudio/PeriodicWave.h |
index cd5c696389c12afefd49f1ef15e4ead0c8b61e67..2a8c65618383d7a19475c1cb814b6004b2ffd534 100644 |
--- a/Source/modules/webaudio/WaveTable.h |
+++ b/Source/modules/webaudio/PeriodicWave.h |
@@ -26,8 +26,8 @@ |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef WaveTable_h |
-#define WaveTable_h |
+#ifndef PeriodicWave_h |
+#define PeriodicWave_h |
#include "bindings/v8/ScriptWrappable.h" |
#include "core/platform/audio/AudioArray.h" |
@@ -40,37 +40,37 @@ |
namespace WebCore { |
-class WaveTable : public ScriptWrappable, public RefCounted<WaveTable> { |
+class PeriodicWave : public ScriptWrappable, public RefCounted<PeriodicWave> { |
public: |
- static PassRefPtr<WaveTable> createSine(float sampleRate); |
- static PassRefPtr<WaveTable> createSquare(float sampleRate); |
- static PassRefPtr<WaveTable> createSawtooth(float sampleRate); |
- static PassRefPtr<WaveTable> createTriangle(float sampleRate); |
+ static PassRefPtr<PeriodicWave> createSine(float sampleRate); |
+ static PassRefPtr<PeriodicWave> createSquare(float sampleRate); |
+ static PassRefPtr<PeriodicWave> createSawtooth(float sampleRate); |
+ static PassRefPtr<PeriodicWave> createTriangle(float sampleRate); |
- // Creates an arbitrary wavetable given the frequency components (Fourier coefficients). |
- static PassRefPtr<WaveTable> create(float sampleRate, Float32Array* real, Float32Array* imag); |
+ // Creates an arbitrary periodic wave given the frequency components (Fourier coefficients). |
+ static PassRefPtr<PeriodicWave> create(float sampleRate, Float32Array* real, Float32Array* imag); |
- // Returns pointers to the lower and higher wavetable data for the pitch range containing |
+ // Returns pointers to the lower and higher wave data for the pitch range containing |
// the given fundamental frequency. These two tables are in adjacent "pitch" ranges |
// where the higher table will have the maximum number of partials which won't alias when played back |
- // at this fundamental frequency. The lower wavetable is the next range containing fewer partials than the higher wavetable. |
+ // at this fundamental frequency. The lower wave is the next range containing fewer partials than the higher wave. |
// Interpolation between these two tables can be made according to tableInterpolationFactor. |
// Where values from 0 -> 1 interpolate between lower -> higher. |
void waveDataForFundamentalFrequency(float, float* &lowerWaveData, float* &higherWaveData, float& tableInterpolationFactor); |
- // Returns the scalar multiplier to the oscillator frequency to calculate wave table phase increment. |
+ // Returns the scalar multiplier to the oscillator frequency to calculate wave buffer phase increment. |
float rateScale() const { return m_rateScale; } |
- unsigned waveTableSize() const { return m_waveTableSize; } |
+ unsigned periodicWaveSize() const { return m_periodicWaveSize; } |
float sampleRate() const { return m_sampleRate; } |
private: |
- explicit WaveTable(float sampleRate); |
+ explicit PeriodicWave(float sampleRate); |
void generateBasicWaveform(int); |
float m_sampleRate; |
- unsigned m_waveTableSize; |
+ unsigned m_periodicWaveSize; |
unsigned m_numberOfRanges; |
float m_centsPerRange; |
@@ -95,4 +95,4 @@ private: |
} // namespace WebCore |
-#endif // WaveTable_h |
+#endif // PeriodicWave_h |