AudioSynthWaveformDc Timed Amplitude Function Not Working

Status
Not open for further replies.

grinch

Well-known member
Hi, I'm working on an audio project that could use a smoothed control signal, was hoping to use AudioSynthWaveformDc with its timed amplitude function. However, when I try to use the timed amplitude function the DC output is stuck at zero, and it doesn't appear the function does anything at all.

For example if I do this in the main loop:

Code:
dc.amplitude(0.5);
Serial.println(dc.read());

The Serial print shows 0.5. But if I do this:

Code:
dc.amplitude(0.5, 100);
Serial.println(dc.read());

The Serial print shows 0.

What's going on? Is this function not actual supported by the audio library?
 
In case anyone else experiences a similar problem here is the answer:

DC must be connected to another audio object for the update function to be called. Making a dumby connection to something else will solve this issue.
 
Status
Not open for further replies.
Back
Top