arduino-audio-tools
|
SoundGenerator using the ModulationBaseClass to generate the samples. More...
#include <AudioEffectsSuite.h>
Public Member Functions | |
SoundGeneratorModulation (ModulationBaseClass &mod, int freq) | |
virtual AudioInfo | audioInfo () |
Provides the AudioInfo. | |
virtual bool | begin () |
bool | begin (AudioInfo info) override |
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. | |
virtual T | readSample () override |
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 |
int | freq |
AudioInfo | info |
float | max_value =32767 |
ModulationBaseClass * | p_mod =nullptr |
RingBuffer< uint8_t > | ring_buffer {0} |
SoundGenerator using the ModulationBaseClass to generate the samples.
T |
|
inlinevirtualinherited |
Reimplemented in GeneratorFromArray< T >, and GeneratorFixedValue< T >.
|
inlineoverridevirtual |
Reimplemented from SoundGenerator< T >.
|
inlinevirtualinherited |
Provides the default configuration.
Reimplemented in STKGenerator< StkCls, T >, STKGenerator< StkCls, int16_t >, SineWaveGenerator< T >, and SineWaveGenerator< int16_t >.
|
inlinevirtualinherited |
ends the processing
Reimplemented in GeneratorFromArray< T >.
|
inlinevirtualinherited |
Checks if the begin method has been called - after end() isActive returns false
|
inlineoverridevirtual |
Provides a single sample.
Implements SoundGenerator< T >.
|
inlinevirtualinherited |
Defines/updates the AudioInfo.
Reimplemented in SineWaveGenerator< T >, and SineWaveGenerator< int16_t >.
|
inlinevirtualinherited |
Abstract method: not implemented! Just provides an error message...
Reimplemented in SineFromTable< T >, SineWaveGenerator< T >, and SineWaveGenerator< int16_t >.