Writes tones of a SoundGenerator as 16 bit PCM with the requested number of channels and volume to a Print.
More...
#include <ModemBase.h>
|
| void | setOutput (Print &out) |
| void | setGenerator (audio_tools::SoundGenerator< int16_t > &generator) |
| audio_tools::SoundGenerator< int16_t > & | generator () |
| bool | begin (audio_tools::AudioInfo info, float volume) |
| | Starts the generator: volume is the amplitude (0.0 - 1.0).
|
| void | tone (float freq, size_t nsamples) |
|
| static int32_t | amplitude (float volume) |
| | minimodem's conversion of the volume to a 16 bit amplitude
|
|
| int16_t | scale (int16_t sample) |
Writes tones of a SoundGenerator as 16 bit PCM with the requested number of channels and volume to a Print.
- Copyright
- GPLv3
◆ amplitude()
| int32_t tinymodem::ToneOutput::amplitude |
( |
float | volume | ) |
|
|
inlinestatic |
minimodem's conversion of the volume to a 16 bit amplitude
◆ begin()
| bool tinymodem::ToneOutput::begin |
( |
audio_tools::AudioInfo | info, |
|
|
float | volume ) |
|
inline |
Starts the generator: volume is the amplitude (0.0 - 1.0).
◆ generator()
| audio_tools::SoundGenerator< int16_t > & tinymodem::ToneOutput::generator |
( |
| ) |
|
|
inline |
◆ scale()
| int16_t tinymodem::ToneOutput::scale |
( |
int16_t | sample | ) |
|
|
inlineprotected |
◆ setGenerator()
| void tinymodem::ToneOutput::setGenerator |
( |
audio_tools::SoundGenerator< int16_t > & | generator | ) |
|
|
inline |
◆ setOutput()
| void tinymodem::ToneOutput::setOutput |
( |
Print & | out | ) |
|
|
inline |
◆ tone()
| void tinymodem::ToneOutput::tone |
( |
float | freq, |
|
|
size_t | nsamples ) |
|
inline |
Writes a tone (frequency 0 = silence) for the indicated number of samples (frames)
◆ buffer
◆ BUFFER_FRAMES
| int tinymodem::ToneOutput::BUFFER_FRAMES = 64 |
|
staticconstexprprotected |
◆ channels
| int tinymodem::ToneOutput::channels = 1 |
|
protected |
◆ default_generator
◆ gain
| int32_t tinymodem::ToneOutput::gain = 32767 |
|
protected |
◆ p_generator
| audio_tools::SoundGenerator<int16_t>* tinymodem::ToneOutput::p_generator = &default_generator |
|
protected |
◆ p_print
| Print* tinymodem::ToneOutput::p_print = nullptr |
|
protected |
The documentation for this class was generated from the following file: