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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp

Issue 2059823002: Use correct value for Oscillator.frequency.minValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update results for Windows. Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/periodicwave-contexts-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 bool OscillatorHandler::propagatesSilence() const 326 bool OscillatorHandler::propagatesSilence() const
327 { 327 {
328 return !isPlayingOrScheduled() || hasFinished() || !m_periodicWave.get(); 328 return !isPlayingOrScheduled() || hasFinished() || !m_periodicWave.get();
329 } 329 }
330 330
331 // ---------------------------------------------------------------- 331 // ----------------------------------------------------------------
332 332
333 OscillatorNode::OscillatorNode(AbstractAudioContext& context) 333 OscillatorNode::OscillatorNode(AbstractAudioContext& context)
334 : AudioScheduledSourceNode(context) 334 : AudioScheduledSourceNode(context)
335 // Use musical pitch standard A440 as a default. 335 // Use musical pitch standard A440 as a default.
336 , m_frequency(AudioParam::create(context, ParamTypeOscillatorFrequency, 440, 0, context.sampleRate() / 2)) 336 , m_frequency(AudioParam::create(context, ParamTypeOscillatorFrequency, 440,
337 - context.sampleRate() / 2,
338 context.sampleRate() / 2))
337 // Default to no detuning. 339 // Default to no detuning.
338 , m_detune(AudioParam::create(context, ParamTypeOscillatorDetune, 0)) 340 , m_detune(AudioParam::create(context, ParamTypeOscillatorDetune, 0))
339 { 341 {
340 setHandler(OscillatorHandler::create(*this, context.sampleRate(), m_frequenc y->handler(), m_detune->handler())); 342 setHandler(OscillatorHandler::create(*this, context.sampleRate(), m_frequenc y->handler(), m_detune->handler()));
341 } 343 }
342 344
343 OscillatorNode* OscillatorNode::create(AbstractAudioContext& context, ExceptionS tate& exceptionState) 345 OscillatorNode* OscillatorNode::create(AbstractAudioContext& context, ExceptionS tate& exceptionState)
344 { 346 {
345 DCHECK(isMainThread()); 347 DCHECK(isMainThread());
346 348
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 return m_detune; 386 return m_detune;
385 } 387 }
386 388
387 void OscillatorNode::setPeriodicWave(PeriodicWave* wave) 389 void OscillatorNode::setPeriodicWave(PeriodicWave* wave)
388 { 390 {
389 oscillatorHandler().setPeriodicWave(wave); 391 oscillatorHandler().setPeriodicWave(wave);
390 } 392 }
391 393
392 } // namespace blink 394 } // namespace blink
393 395
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/periodicwave-contexts-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698