Creating "basic waveform" Oscillator nodes is not efficient
[WebKit-https.git] / Source / WebCore / Modules / webaudio / Oscillator.h
index 2158a82..127b31b 100644 (file)
@@ -99,6 +99,12 @@ private:
     AudioFloatArray m_detuneValues;
     
     RefPtr<WaveTable> m_waveTable;
+
+    // Cache the wave tables for different waveform types, except CUSTOM.
+    static WaveTable* s_waveTableSine;
+    static WaveTable* s_waveTableSquare;
+    static WaveTable* s_waveTableSawtooth;
+    static WaveTable* s_waveTableTriangle;
 };
 
 } // namespace WebCore