|
TinyModem
Header-only software audio modem library
|
Common API of the modulators (FSKEncoder, MFSKEncoder): the written data is converted to 16 bit PCM audio which is written to the output. More...
#include <ModemBase.h>


Public Member Functions | |
| void | setOutput (Print &out) override |
| void | setGenerator (audio_tools::SoundGenerator< int16_t > &generator) |
| audio_tools::SoundGenerator< int16_t > & | getGenerator () |
| Provides the active tone generator. | |
| virtual bool | endTransmission (size_t silence_samples=0)=0 |
| virtual bool | isTransmitting ()=0 |
| true between the first character and endTransmission() | |
| virtual bool | writeIdle (size_t nsamples) |
| Sends an idle carrier: returns false if this is not supported. | |
| void | writeSilence (size_t nsamples) |
| Writes the indicated number of samples of silence. | |
| void | writeTone (float freq, size_t nsamples) |
| Writes a tone for the indicated number of samples. | |
| void | flush () |
| Ends the transmission. | |
| virtual float | symbolRate ()=0 |
| Symbols (bits for FSK) per second. | |
| const char * | mime () override |
Protected Attributes | |
| ToneOutput | tones |
Common API of the modulators (FSKEncoder, MFSKEncoder): the written data is converted to 16 bit PCM audio which is written to the output.
|
pure virtual |
Ends the transmission (and adds optional silence): returns true if a transmission was ended
Implemented in tinymodem::AX25Encoder, tinymodem::CSSEncoder, tinymodem::DTMFEncoder, tinymodem::FSKEncoder, tinymodem::GGWaveEncoder, tinymodem::MFSKEncoder, tinymodem::MorseEncoder, tinymodem::OFDMEncoder, tinymodem::OliviaEncoder, and tinymodem::PSKEncoder.
|
inline |
Ends the transmission.
|
inline |
Provides the active tone generator.
|
pure virtual |
true between the first character and endTransmission()
Implemented in tinymodem::AX25Encoder, tinymodem::CSSEncoder, tinymodem::DTMFEncoder, tinymodem::FSKEncoder, tinymodem::GGWaveEncoder, tinymodem::MFSKEncoder, tinymodem::MorseEncoder, tinymodem::OFDMEncoder, tinymodem::OliviaEncoder, and tinymodem::PSKEncoder.
|
inlineoverride |
|
inline |
Replaces the default tone generator: the generator must change the frequency immediately and keep the phase continuous in setFrequency() (e.g. the AudioTools FastIntSineGenerator). Call it before begin().
|
inlineoverride |
|
pure virtual |
Symbols (bits for FSK) per second.
Implemented in tinymodem::AX25Encoder, tinymodem::CSSEncoder, tinymodem::DTMFEncoder, tinymodem::FSKEncoder, tinymodem::GGWaveEncoder, tinymodem::MFSKEncoder, tinymodem::MorseEncoder, tinymodem::OFDMEncoder, tinymodem::OliviaEncoder, and tinymodem::PSKEncoder.
|
inlinevirtual |
Sends an idle carrier: returns false if this is not supported.
Reimplemented in tinymodem::AX25Encoder, tinymodem::DTMFEncoder, tinymodem::FSKEncoder, tinymodem::MorseEncoder, tinymodem::OliviaEncoder, and tinymodem::PSKEncoder.
|
inline |
Writes the indicated number of samples of silence.
|
inline |
Writes a tone for the indicated number of samples.
|
protected |