|
arduino-audio-tools
|
DSF (DSD Stream File) format encoder. More...
#include <CodecDSF.h>
Classes | |
| struct | ChannelModState |
Public Member Functions | |
| DSFEncoder ()=default | |
| DSFEncoder (DSFMetadata metaData) | |
| AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| bool | begin () override |
| virtual bool | begin (AudioInfo info) |
| void | end () override |
| virtual uint32_t | frameDurationUs () |
| Optional rtsp function: provide the frame duration in microseconds. | |
| virtual int | frameSize () |
| const DSFMetadata | getMetadata () |
| const char * | mime () override |
| Provides the mime type of the encoded result. | |
| 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 | setMetaData (DSFMetadata metaData) |
| void | setOutput (Print &out) override |
| Default output assignment (encoders may override to store Print reference) | |
| size_t | write (const uint8_t *data, size_t len) override |
Protected Member Functions | |
| bool | allBlocksFull () |
| void | convertSampleToDSD (int ch, float currentSample) |
| void | flushPartialBlocks () |
| float | readPCMSample (const uint8_t *ptr) |
| void | writeBlocking (Print *out, uint8_t *data, size_t len) |
| void | writeBlockSet () |
| void | writeDSFHeader () |
Protected Attributes | |
| Vector< SingleBuffer< uint8_t > > | channelBlocks |
| Vector< ChannelModState > | chState |
| bool | headerWritten = false |
| AudioInfo | info |
| bool | isOpen = false |
| DSFMetadata | meta |
| uint32_t | oversamplingRatio = 64 |
| Print * | p_print = nullptr |
| uint64_t | totalDsdBytes = 0 |
DSF (DSD Stream File) format encoder.
Encodes PCM audio into DSD format and writes DSF files. Uses a 2nd order error-feedback delta-sigma modulator with linear interpolation between PCM samples. Output uses correct DSF block-level channel interleaving.
|
default |
|
inline |
|
inlineprotected |
|
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 |
Implements AudioWriter.
|
inlinevirtualinherited |
Reimplemented in OpusOggEncoder, OggContainerEncoder, DecoderBasic, AudioDecoder, AACEncoderFDK, AACEncoderVO, OggContainerDecoder, and MetaDataFilterEncoder.
|
inlineprotected |
|
inlineoverridevirtual |
Implements AudioWriter.
|
inlineprotected |
|
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 the mime type of the encoded result.
Implements AudioEncoder.
|
inlineoverridevirtual |
Implements AudioWriter.
|
inlineprotected |
|
inlinevirtualinherited |
Optional rtsp function: provide samples per the frame.
Reimplemented in OpusAudioEncoder, OpusMultiStreamAudioEncoder, MP3EncoderShine, MP3ParserEncoder, and MetaDataFilterEncoder.
|
inlineoverridevirtual |
Defines the sample rate, number of channels and bits per sample.
Reimplemented from AudioEncoder.
|
inline |
|
inlineoverridevirtual |
Default output assignment (encoders may override to store Print reference)
Reimplemented from AudioEncoder.
|
inlineoverridevirtual |
Implements AudioWriter.
|
inlineprotectedinherited |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |