|
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. | |
| 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.
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, and ResampleStreamT< TInterpolator >.
|
inlineoverridevirtual |
Implements AudioWriter.
Reimplemented in OpusOggEncoder, OggContainerEncoder, DecoderBasic, AudioDecoder, AACEncoderFDK, OggContainerDecoder, and MetaDataFilterEncoder.
|
inlineoverridevirtual |
Implements AudioWriter.
|
inlineprotected |
Optional rtsp function: provide the frame duration in microseconds.
Reimplemented in ADPCMEncoder, MP3EncoderShine, OpusOggEncoder, MP3ParserEncoder, and MetaDataFilterEncoder.
|
inline |
Provides the mime type of the encoded result.
Implements AudioEncoder.
Implements AudioWriter.
Optional rtsp function: provide samples per the frame.
Reimplemented in MP3EncoderShine, MP3ParserEncoder, and MetaDataFilterEncoder.
Defines the sample rate, number of channels and bits per sample.
Reimplemented from AudioEncoder.
|
inline |
Default output assignment (encoders may override to store Print reference)
Reimplemented from AudioEncoder.
Implements AudioWriter.
|
inlineprotected |
|
inlineprotected |
|
protected |
|
protected |
|
protectedinherited |
|
protected |
|
protected |
|
protected |