arduino-audio-tools
|
Abstract Software Implementation of an Oversampling DAC. More...
#include <AudioDAC.h>
Public Member Functions | |
virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
Adds target to be notified about audio changes. | |
virtual AudioInfo | audioInfo () override |
provides the actual input AudioInfo | |
virtual AudioInfo | audioInfoOut () |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream | |
virtual int | availableForWrite () override |
virtual bool | begin () |
virtual bool | begin (AudioInfo info) |
virtual bool | begin (DACInfo cfg) |
starts the Delta Sigma DAC | |
virtual void | clearNotifyAudioChange () |
Deletes all change notify subscriptions. | |
virtual DACInfo | defaultConfig () |
virtual void | end () |
Stops the output. | |
virtual void | flush () |
bool | isBlocking () |
virtual bool | isDeletable () |
If true we need to release the related memory in the destructor. | |
bool | isNotifyActive () |
Checks if the automatic AudioInfo update is active. | |
virtual | operator bool () |
virtual uint32_t | outputFrameCount () |
To be used for testing, we just count the number of frames that were sent to output. | |
virtual uint32_t | outputRate ()=0 |
virtual bool | removeNotifyAudioChange (AudioInfoSupport &bi) |
Removes a target in order not to be notified about audio changes. | |
virtual void | setAudioInfo (AudioInfo newInfo) override |
Defines the input AudioInfo. | |
void | setBlocking (bool blocking) |
void | setNotifyActive (bool flag) |
Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
TimerAlarmRepeating & | timer () |
virtual size_t | write (const uint8_t *data, size_t len) |
Writes the audio data to the output buffer. | |
virtual size_t | write (uint8_t c) |
Writes a single byte (of audio data) to the output buffer. | |
virtual void | writeSilence (size_t len) |
Protected Member Functions | |
virtual size_t | availableFramesToWrite ()=0 |
determines how many frames we can write to the buffer | |
void | notifyAudioChange (AudioInfo info) |
virtual void | quantize (int16_t newSamp, int left_right_idx)=0 |
updates the buffer with analog value (represented by number of 1) | |
virtual void | reset () |
Releases the memory. | |
virtual void | startTimer ()=0 |
Protected Attributes | |
int | _timeout = 10 |
bool | active |
uint8_t | bytes_per_sample = 2 |
AudioInfo | cfg |
int32_t * | cummulated_error = nullptr |
int | current_bit = -1 |
int32_t * | current_values = nullptr |
const int | fixedPosValue =0x007fff00 |
DACInfo | info |
bool | is_active = false |
bool | is_blocking = true |
bool | is_notify_active = true |
int32_t * | last_values = nullptr |
Vector< AudioInfoSupport * > | notify_vector |
DACOut | out |
TimerAlarmRepeating | timer_object |
SingleBuffer< uint8_t > | tmp {MAX_SINGLE_CHARS} |
int | tmpPos = 0 |
uint8_t | write_buffer [4] |
int | write_buffer_pos = 0 |
Abstract Software Implementation of an Oversampling DAC.
|
inlinevirtualinherited |
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, MP3DecoderMAD, EncodedAudioOutput, EncodedAudioStream, AACDecoderFDK, DecoderBasic, MP3DecoderHelix, OggContainerDecoder, Pipeline, and Pipeline::ModifyingStreamAdapter.
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in AdapterPrintToAudioOutput, and AdapterAudioStreamToAudioOutput.
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, and ResampleStream.
Reimplemented from Print.
Reimplemented in RTSPOutput, and AudioFFTBase.
determines how many frames we can write to the buffer
Implemented in SimpleDAC, OversamplingDAC32, and PWMDAC.
Reimplemented in AudioOutputWithCallback, EncodedAudioOutput, OggContainerOutput, AudioFFTBase, MetaDataFilter, and CsvOutput< T >.
Reimplemented in AudioESP32ULP, CsvOutput< T >, and EncodedAudioOutput.
starts the Delta Sigma DAC
Reimplemented in SimpleDAC, OversamplingDAC32, PWMDAC, and SerialDAC.
Stops the output.
Reimplemented from AudioOutput.
If true we need to release the related memory in the destructor.
Reimplemented in AdapterPrintToAudioOutput, and AdapterAudioStreamToAudioOutput.
Reimplemented in EncodedAudioOutput, and RTSPOutput.
updates the buffer with analog value (represented by number of 1)
Implemented in SimpleDAC, PWMDAC, OversamplingDAC32, and SerialDAC.
Defines the input AudioInfo.
Implements AudioInfoSupport.
Reimplemented in ChannelsSelectOutput, AdapterPrintToAudioOutput, MultiOutput, AudioFFTBase, AdapterAudioStreamToAudioOutput, CsvOutput< T >, PWMAudioOutput, and EncodedAudioOutput.
Writes a single byte (of audio data) to the output buffer.
Reimplemented from AudioOutput.
Writes n 0 values (= silence)
len |