| OLD | NEW |
| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 OscillatorHandler::OscillatorHandler(AudioNode& node, | 42 OscillatorHandler::OscillatorHandler(AudioNode& node, |
| 43 float sampleRate, | 43 float sampleRate, |
| 44 AudioParamHandler& frequency, | 44 AudioParamHandler& frequency, |
| 45 AudioParamHandler& detune) | 45 AudioParamHandler& detune) |
| 46 : AudioScheduledSourceHandler(NodeTypeOscillator, node, sampleRate), | 46 : AudioScheduledSourceHandler(NodeTypeOscillator, node, sampleRate), |
| 47 m_type(SINE), | 47 m_type(SINE), |
| 48 m_frequency(frequency), | 48 m_frequency(frequency), |
| 49 m_detune(detune), | 49 m_detune(detune), |
| 50 m_firstRender(true), | 50 m_firstRender(true), |
| 51 m_virtualReadIndex(0), | 51 m_virtualReadIndex(0), |
| 52 m_phaseIncrements(ProcessingSizeInFrames), | 52 m_phaseIncrements(AudioUtilities::kRenderQuantumFrames), |
| 53 m_detuneValues(ProcessingSizeInFrames) { | 53 m_detuneValues(AudioUtilities::kRenderQuantumFrames) { |
| 54 // Sets up default wavetable. | 54 // Sets up default wavetable. |
| 55 setType(m_type); | 55 setType(m_type); |
| 56 | 56 |
| 57 // An oscillator is always mono. | 57 // An oscillator is always mono. |
| 58 addOutput(1); | 58 addOutput(1); |
| 59 | 59 |
| 60 initialize(); | 60 initialize(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 PassRefPtr<OscillatorHandler> OscillatorHandler::create( | 63 PassRefPtr<OscillatorHandler> OscillatorHandler::create( |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 | 444 |
| 445 AudioParam* OscillatorNode::detune() { | 445 AudioParam* OscillatorNode::detune() { |
| 446 return m_detune; | 446 return m_detune; |
| 447 } | 447 } |
| 448 | 448 |
| 449 void OscillatorNode::setPeriodicWave(PeriodicWave* wave) { | 449 void OscillatorNode::setPeriodicWave(PeriodicWave* wave) { |
| 450 oscillatorHandler().setPeriodicWave(wave); | 450 oscillatorHandler().setPeriodicWave(wave); |
| 451 } | 451 } |
| 452 | 452 |
| 453 } // namespace blink | 453 } // namespace blink |
| OLD | NEW |