arduino-audio-tools
|
EncoderL8s - Condenses 16 bit PCM data stream to 8 bits data. Most microcontrollers can not process 8 bit audio data directly. 8 bit data however is very memory efficient and helps if you need to store audio on constrained resources. This encoder translates 16bit data into 8bit data. By default the encoded data is represented as uint8_t, so the values are from 0 to 255. More...
#include <CodecL8.h>
Public Member Functions | |
EncoderL8 (bool isSigned=false) | |
EncoderL8 (Print &out) | |
AudioInfo | audioInfo () override |
provides the actual input AudioInfo | |
virtual AudioInfo | audioInfoOut () |
bool | begin () override |
starts the processing using the actual RAWAudioInfo | |
virtual bool | begin (AudioInfo info) |
bool | begin (Print &out) |
starts the processing | |
int16_t | convertSample (int16_t sample) |
void | end () override |
stops the processing | |
virtual uint32_t | frameDurationUs () |
Optional rtsp function: provide the frame duration in microseconds. | |
bool | isOpen () |
const char * | mime () override |
Provides "audio/pcm". | |
operator bool () override | |
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. | |
void | setOutput (Print &out_stream) override |
Defines the output Stream. | |
void | setSigned (bool isSigned) |
By default the encoded values are unsigned, but can change them to signed. | |
size_t | write (const uint8_t *data, size_t len) override |
Writes PCM data to be encoded as RAW. | |
Protected Member Functions | |
void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Protected Attributes | |
Vector< int8_t > | buffer |
AudioInfo | info |
bool | is_open |
bool | is_signed = false |
Print * | p_print = nullptr |
EncoderL8s - Condenses 16 bit PCM data stream to 8 bits data. Most microcontrollers can not process 8 bit audio data directly. 8 bit data however is very memory efficient and helps if you need to store audio on constrained resources. This encoder translates 16bit data into 8bit data. By default the encoded data is represented as uint8_t, so the values are from 0 to 255.
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, BinaryContainerEncoder, and MP3ParserEncoder.
|
inlinevirtualinherited |
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 >.
|
inlineoverridevirtual |
starts the processing using the actual RAWAudioInfo
Implements AudioWriter.
|
inlinevirtualinherited |
Reimplemented in AACEncoderFDK.
|
inlineoverridevirtual |
stops the processing
Implements AudioWriter.
|
inlinevirtualinherited |
Optional rtsp function: provide the frame duration in microseconds.
Reimplemented in ADPCMEncoder, OpusOggEncoder, MP3ParserEncoder, and MetaDataFilterEncoder.
|
inlineoverridevirtual |
Provides "audio/pcm".
Implements AudioEncoder.
|
inlineoverridevirtual |
Implements AudioWriter.
|
inlinevirtualinherited |
Optional rtsp function: provide samples per the frame.
Reimplemented in MP3ParserEncoder, and MetaDataFilterEncoder.
|
inlineoverridevirtualinherited |
Defines the sample rate, number of channels and bits per sample.
Implements AudioWriter.
Reimplemented in MP3EncoderLAME, EncoderBasic, CodecChain, FLACEncoder, OpusAudioEncoder, WAVEncoder, CodecNOP, G7xxEncoder, BinaryContainerEncoder, OggContainerEncoder, OSCContainerEncoder, and MetaDataFilterEncoder.
|
inlineoverridevirtual |
Defines the output Stream.
Reimplemented from AudioEncoder.
|
inlineoverridevirtual |
Writes PCM data to be encoded as RAW.
Implements AudioWriter.