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

Method PolyBLEPNode

src/extended/PolyBLEPNode.cpp:397–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397PolyBLEPNode::PolyBLEPNode(AudioContext & ac)
398 : AudioScheduledSourceNode(ac, *desc())
399{
400 m_type = setting("type");
401 m_frequency = param("frequency");
402 m_amplitude = param("amplitude");
403
404 m_type->setValueChanged([this]() {
405 setType(PolyBLEPType(m_type->valueUint32()));
406 });
407
408 // An oscillator is always mono.
409 addOutput(std::unique_ptr<AudioNodeOutput>(new AudioNodeOutput(this, 1)));
410
411 polyblep.reset(new PolyBlepImpl(ac.sampleRate()));
412 setType(PolyBLEPType::TRIANGLE);
413 initialize();
414}
415
416PolyBLEPNode::~PolyBLEPNode()
417{

Callers

nothing calls this directly

Calls 5

PolyBLEPTypeEnum · 0.85
setValueChangedMethod · 0.80
valueUint32Method · 0.80
resetMethod · 0.45
sampleRateMethod · 0.45

Tested by

no test coverage detected