|
arduino-audio-tools
|
EncoderL16s - 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. More...
#include <CodecL16.h>
Public Member Functions | |
| EncoderL16 () | |
| EncoderL16 (Print &out) | |
| AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| virtual bool | begin () override |
| starts the processing using the actual RAWAudioInfo | |
| virtual bool | begin (AudioInfo info) |
| bool | begin (Print &out) |
| starts the processing | |
| void | end () override |
| stops the processing | |
| virtual uint32_t | frameDurationUs () |
| Optional rtsp function: provide the frame duration in microseconds. | |
| virtual int | frameSize () |
| 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. | |
| virtual 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 | |
| AudioInfo | info |
| bool | is_open |
| Print * | p_print = nullptr |
EncoderL16s - 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.
|
inline |
|
inline |
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, MP3EncoderShine, BinaryContainerEncoder, and MP3ParserEncoder.
|
inlinevirtualinherited |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in MP3EncoderShine, PureDataStream, PWMAudioOutput< PWMDriverT >, ChannelFormatConverterStreamT< T >, ChannelFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, NumberFormatConverterStream, FormatConverterStream, Pipeline, ResampleStream, ResampleStreamT< TInterpolator >, and SupportedRatesStream.
|
inlineoverridevirtual |
starts the processing using the actual RAWAudioInfo
Implements AudioWriter.
|
inlinevirtualinherited |
Reimplemented in OpusOggEncoder, OggContainerEncoder, DecoderBasic, AudioDecoder, AACEncoderFDK, AACEncoderVO, OggContainerDecoder, and MetaDataFilterEncoder.
|
inline |
starts the processing
|
inlineoverridevirtual |
stops the processing
Implements AudioWriter.
|
inlinevirtualinherited |
Optional rtsp function: provide the frame duration in microseconds.
Reimplemented in ADPCMEncoder, MP3EncoderShine, OpusOggEncoder, MP3ParserEncoder, and MetaDataFilterEncoder.
|
inlinevirtualinherited |
Optional rtsp function: provide the encoded size (in bytes) of one frame, once known (e.g. after the encoder has seen real data). Lets an RTSPFormat size its RTP fragments to match one frame instead of a fixed guess, so throughput actually tracks frameDurationUs() - a fragment size covering several frames' worth of bytes sent at one-frame timing overruns real-time bandwidth and, over UDP (no flow control), causes packet loss. Returns 0 if not yet known/not applicable (fixed-frame-size codecs have no need to override this).
Reimplemented in ADPCMEncoder, EncoderALAC, AMRNBEncoder, AMRWBEncoder, and MP3ParserEncoder.
|
inline |
|
inlineoverridevirtual |
Provides "audio/pcm".
Implements AudioEncoder.
|
inlineoverridevirtual |
Implements AudioWriter.
|
inlinevirtualinherited |
Optional rtsp function: provide samples per the frame.
Reimplemented in OpusAudioEncoder, OpusMultiStreamAudioEncoder, MP3EncoderShine, MP3ParserEncoder, and MetaDataFilterEncoder.
|
inlineoverridevirtualinherited |
Defines the sample rate, number of channels and bits per sample.
Implements AudioWriter.
Reimplemented in MP3EncoderLAME, EncoderBasic, CodecChain, DSFEncoder, FLACEncoder, MP3EncoderShine, OpusAudioEncoder, OpusMultiStreamAudioEncoder, WAVEncoder, CodecNOP, G7xxEncoder, G729Encoder, BinaryContainerEncoder, OggContainerEncoder, OSCContainerEncoder, H264RtpEncoder, JPEGRtpEncoder, and MetaDataFilterEncoder.
|
inlineoverridevirtual |
Defines the output Stream.
Reimplemented from AudioEncoder.
|
inlineoverridevirtual |
Writes PCM data to be encoded as RAW.
Implements AudioWriter.
|
inlineprotectedinherited |
|
protectedinherited |
|
protected |
|
protected |