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

Unified Diff: LayoutTests/webaudio/resources/oscillator-testing.js

Issue 209423006: WebAudio: Remove legacy support for numerical values for Oscillator types. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/webaudio/resources/oscillator-testing.js
diff --git a/LayoutTests/webaudio/resources/oscillator-testing.js b/LayoutTests/webaudio/resources/oscillator-testing.js
index ae01db8131b16418d5af9a788a2f5e64f72d2fe8..b27953d08862eca0a003051c4e5d8db20319e5e5 100644
--- a/LayoutTests/webaudio/resources/oscillator-testing.js
+++ b/LayoutTests/webaudio/resources/oscillator-testing.js
@@ -17,20 +17,12 @@ var lowFrequency = 10;
var highFrequency = nyquist + 2000; // go slightly higher than nyquist to make sure we generate silence there
var context = 0;
-var OSC = {
- SINE: 0,
- SQUARE: 1,
- SAWTOOTH: 2,
- TRIANGLE: 3,
- CUSTOM: 4,
-};
-
function generateExponentialOscillatorSweep(oscillatorType) {
// Create offline audio context.
context = new OfflineAudioContext(1, sampleRate * lengthInSeconds, sampleRate);
var osc = context.createOscillator();
- if (oscillatorType == OSC.CUSTOM) {
+ if (oscillatorType == "custom") {
// Create a simple waveform with three Fourier coefficients.
// Note the first values are expected to be zero (DC for coeffA and Nyquist for coeffB).
var coeffA = new Float32Array([0, 1, 0.5]);

Powered by Google App Engine
This is Rietveld 408576698