Assembles the PCM frames from the written bytes and provides the samples of the selected channel as float (-1.0 to 1.0). Supports 8, 16 and 32 bit signed samples.
More...
#include <ModemBase.h>
|
| bool | begin (int bits_per_sample, int channels, int channel) |
| | Defines the format: returns false (and logs the reason) if not supported.
|
| void | reset () |
| | Drops an incomplete frame.
|
| template<class F> |
| void | write (const uint8_t *data, size_t len, F on_sample) |
| | Calls on_sample(float) for each complete frame.
|
Assembles the PCM frames from the written bytes and provides the samples of the selected channel as float (-1.0 to 1.0). Supports 8, 16 and 32 bit signed samples.
- Copyright
- GPLv3
◆ begin()
| bool tinymodem::PcmInput::begin |
( |
int | bits_per_sample, |
|
|
int | channels, |
|
|
int | channel ) |
|
inline |
Defines the format: returns false (and logs the reason) if not supported.
◆ reset()
| void tinymodem::PcmInput::reset |
( |
| ) |
|
|
inline |
Drops an incomplete frame.
◆ sampleValue()
| float tinymodem::PcmInput::sampleValue |
( |
const uint8_t * | ptr | ) |
|
|
inlineprotected |
◆ write()
template<class F>
| void tinymodem::PcmInput::write |
( |
const uint8_t * | data, |
|
|
size_t | len, |
|
|
F | on_sample ) |
|
inline |
Calls on_sample(float) for each complete frame.
◆ bits
| int tinymodem::PcmInput::bits = 16 |
|
protected |
◆ frame_bytes
| int tinymodem::PcmInput::frame_bytes = 2 |
|
protected |
◆ MAX_CHANNELS
| int tinymodem::PcmInput::MAX_CHANNELS = 8 |
|
staticconstexpr |
◆ partial
◆ partial_len
| int tinymodem::PcmInput::partial_len = 0 |
|
protected |
◆ sample_offset
| int tinymodem::PcmInput::sample_offset = 0 |
|
protected |
The documentation for this class was generated from the following file: