arduino-audio-tools
|
Provides a fixed value (e.g. 0) as sound data. This can be used e.g. to test the output functionality which should optimally just output silence and no artifacts. More...
#include <SoundGenerator.h>
Public Member Functions | |
SilenceGenerator (T value=0) | |
virtual AudioInfo | audioInfo () |
Provides the AudioInfo. | |
virtual bool | begin () |
virtual bool | begin (AudioInfo info) |
virtual AudioInfo | defaultConfig () |
Provides the default configuration. | |
virtual void | end () |
ends the processing | |
virtual bool | isActive () |
virtual size_t | readBytes (uint8_t *data, size_t len) |
Provides the data as byte array with the requested number of channels. | |
T | readSample () |
Provides a single sample. | |
virtual void | setAudioInfo (AudioInfo info) |
Defines/updates the AudioInfo. | |
virtual void | setFrequency (float frequency) |
Abstract method: not implemented! Just provides an error message... | |
Protected Attributes | |
bool | active = false |
bool | activeWarningIssued = false |
AudioInfo | info |
RingBuffer< uint8_t > | ring_buffer {0} |
T | value |
Provides a fixed value (e.g. 0) as sound data. This can be used e.g. to test the output functionality which should optimally just output silence and no artifacts.
|
inlinevirtualinherited |
Checks if the begin method has been called - after end() isActive returns false