| 68 | } |
| 69 | |
| 70 | OscillatorNode::OscillatorNode(AudioContext & ac) |
| 71 | : AudioScheduledSourceNode(ac, *desc()) |
| 72 | , m_phaseIncrements(AudioNode::ProcessingSizeInFrames) |
| 73 | , m_detuneValues(AudioNode::ProcessingSizeInFrames) |
| 74 | { |
| 75 | m_frequency = param("frequency"); |
| 76 | m_detune = param("detune"); |
| 77 | m_amplitude = param("amplitude"); |
| 78 | m_bias = param("bias"); |
| 79 | |
| 80 | m_type = setting("type"); |
| 81 | m_type->setValueChanged([this]() { setType(OscillatorType(m_type->valueUint32())); }); |
| 82 | |
| 83 | setType(OscillatorType::SINE); |
| 84 | |
| 85 | // An oscillator is always mono. |
| 86 | addOutput(std::unique_ptr<AudioNodeOutput>(new AudioNodeOutput(this, 1))); |
| 87 | initialize(); |
| 88 | } |
| 89 | |
| 90 | OscillatorNode::~OscillatorNode() |
| 91 | { |
nothing calls this directly
no test coverage detected