MCPcopy Create free account
hub / github.com/LabSound/LabSound / OscillatorNode

Method OscillatorNode

src/core/OscillatorNode.cpp:70–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70OscillatorNode::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
90OscillatorNode::~OscillatorNode()
91{

Callers

nothing calls this directly

Calls 3

OscillatorTypeEnum · 0.85
setValueChangedMethod · 0.80
valueUint32Method · 0.80

Tested by

no test coverage detected