|
arduino-audio-tools
|
Encoder for Codec2 - Depends on https://github.com/pschatzmann/arduino-libcodec2. More...
#include <CodecCodec2.h>
Public Member Functions | |
| Codec2Encoder (int bps=3200) | |
| AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| bool | begin () |
| virtual bool | begin (AudioInfo info) |
| int | bitsPerSecond () |
| int | bytesCompressed () |
| int | bytesUncompressed () |
| virtual void | end () |
| virtual uint32_t | frameDurationUs () |
| Optional rtsp function: provide the frame duration in microseconds. | |
| virtual const char * | mime () |
| Provides the mime type of the encoded result. | |
| operator bool () | |
| virtual uint16_t | samplesPerFrame () |
| Optional rtsp function: provide samples per the frame. | |
| void | setAudioInfo (AudioInfo from) override |
| Defines the sample rate, number of channels and bits per sample. | |
| virtual void | setBitsPerSecond (int bps) |
| virtual void | setOutput (Print &out_stream) |
| Default output assignment (encoders may override to store Print reference) | |
| size_t | write (const uint8_t *in_ptr, size_t in_size) override |
Protected Member Functions | |
| void | processByte (uint8_t byte) |
| void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Protected Attributes | |
| int | bits_per_second = 0 |
| int | buffer_pos = 0 |
| AudioInfo | info |
| Vector< uint8_t > | input_buffer |
| bool | is_active = false |
| struct CODEC2 * | p_codec2 = nullptr |
| Print * | p_print = nullptr |
| Vector< uint8_t > | result_buffer |
Encoder for Codec2 - Depends on https://github.com/pschatzmann/arduino-libcodec2.
|
inline |
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, BinaryContainerEncoder, and MP3ParserEncoder.
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in PureDataStream, PWMAudioOutput, ChannelFormatConverterStreamT< T >, ChannelFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, NumberFormatConverterStream, FormatConverterStream, Pipeline, ResampleStream, and ResampleStreamT< TInterpolator >.
|
inlinevirtual |
Implements AudioWriter.
Reimplemented in OggContainerEncoder, DecoderBasic, AudioDecoder, AACEncoderFDK, OggContainerDecoder, and MetaDataFilterEncoder.
|
inline |
|
inline |
|
inline |
Implements AudioWriter.
Optional rtsp function: provide the frame duration in microseconds.
Reimplemented in ADPCMEncoder, OpusOggEncoder, MP3ParserEncoder, and MetaDataFilterEncoder.
Provides the mime type of the encoded result.
Implements AudioEncoder.
Implements AudioWriter.
Optional rtsp function: provide samples per the frame.
Reimplemented in MP3ParserEncoder, and MetaDataFilterEncoder.
Defines the sample rate, number of channels and bits per sample.
Implements AudioWriter.
Reimplemented in MP3EncoderLAME, EncoderBasic, CodecChain, FLACEncoder, OpusAudioEncoder, WAVEncoder, CodecNOP, G7xxEncoder, G729Encoder, BinaryContainerEncoder, OggContainerEncoder, OSCContainerEncoder, and MetaDataFilterEncoder.
sets bits per second: 3200, 2400, 1600, 1400, 1300, 1200, 700 and 450 bit/s
Default output assignment (encoders may override to store Print reference)
Reimplemented from AudioEncoder.
Implements AudioWriter.
|
protected |
|
protected |
|
protectedinherited |