|
arduino-audio-tools
|
OBSOLETE AudioEffects: the template class describes the input audio to which the effects are applied: e.g. SineWaveGenerator, SquareWaveGenerator, GeneratorFromStream etc. We support only one channel of int16_t data! More...
#include <AudioEffects.h>
Public Member Functions | |
| AudioEffects ()=default | |
| Default constructor. | |
| AudioEffects (AudioEffects ©) | |
| Copy constructor. | |
| AudioEffects (GeneratorT &generator) | |
| Constructor which is assigning a generator. | |
| AudioEffects (Stream &input, int channels=2, float volume=1.0) | |
| virtual | ~AudioEffects () |
| Destructor. | |
| void | addEffect (AudioEffect &effect) |
| Adds an effect object (by reference) | |
| void | addEffect (AudioEffect *effect) |
| Adds an effect using a pointer. | |
| virtual AudioInfo | audioInfo () |
| Provides the AudioInfo. | |
| virtual bool | begin () |
| virtual bool | begin (AudioInfo info) |
| void | clear () |
| deletes all defined effects | |
| virtual AudioInfo | defaultConfig () |
| Provides the default configuration. | |
| virtual void | end () |
| ends the processing | |
| AudioEffect * | findEffect (int id) |
| Finds an effect by id. | |
| GeneratorT & | generator () |
| Provides access to the sound generator. | |
| virtual bool | isActive () |
| AudioEffect * | operator[] (int idx) |
| gets an effect by index | |
| virtual size_t | readBytes (uint8_t *data, size_t len) |
| Provides the data as byte array with the requested number of channels. | |
| effect_t | readSample () override |
| provides the resulting sample | |
| virtual void | setAudioInfo (AudioInfo info) |
| Defines/updates the AudioInfo. | |
| virtual void | setFrequency (float frequency) |
| Abstract method: not implemented! Just provides an error message... | |
| void | setInput (GeneratorT &in) |
| Defines the input source for the raw guitar input. | |
| size_t | size () |
| Provides the actual number of defined effects. | |
Protected Attributes | |
| bool | active |
| bool | activeWarningIssued |
| AudioEffectCommon | effects |
| AudioInfo | info |
| bool | owns_generator = false |
| GeneratorT * | p_generator =nullptr |
| RingBuffer< uint8_t > | ring_buffer |
OBSOLETE AudioEffects: the template class describes the input audio to which the effects are applied: e.g. SineWaveGenerator, SquareWaveGenerator, GeneratorFromStream etc. We support only one channel of int16_t data!
We subclass the AudioEffects from GeneratorT so that we can use this class with the GeneratedSoundStream class to output the audio.
|
inline |
Constructor which is assigning a Stream as input. The stream must consist of int16_t values with the indicated number of channels. Type type parameter is e.g. <GeneratorFromStream<effect_t>
|
inlinevirtualinherited |
Checks if the begin method has been called - after end() isActive returns false
|
inlineoverridevirtual |
provides the resulting sample
Implements SoundGenerator< effect_t >.