|
arduino-audio-tools
|
Fade In and Fade out in order to prevent popping sound when the audio is started or stopped. The fade in/out is performed over the length of the buffer. More...
#include <Fade.h>
Public Member Functions | |
| void | convert (uint8_t *data, int bytes, int channels, int bitsPerSample) |
| Updates the amplitude of the data when a fade in or fade out has been requested. | |
| bool | isFadeComplete () |
| Returns true if the conversion has been executed with any data. | |
| bool | isFadeInActive () |
| bool | isFadeOutActive () |
| void | setFadeInActive (bool flag) |
| void | setFadeOutActive (bool flag) |
Protected Member Functions | |
| template<typename T > | |
| void | convertFrames (T *data, int frames, int channels) |
| template<typename T > | |
| void | fadeIn (T *data, int frames, int channels, float delta) |
| template<typename T > | |
| void | fadeOut (T *data, int frames, int channels, float delta) |
Protected Attributes | |
| int | channels = 2 |
| bool | is_done = false |
| bool | is_fade_in = false |
| bool | is_fade_out = false |
| float | volume = 1.0 |
Fade In and Fade out in order to prevent popping sound when the audio is started or stopped. The fade in/out is performed over the length of the buffer.
Updates the amplitude of the data when a fade in or fade out has been requested.
| data | |
| bytes | |
| channels | |
| bitsPerSample |
|
inline |
Returns true if the conversion has been executed with any data.
|
inline |
|
inline |
|
protected |
|
protected |