arduino-audio-tools
|
Outputs to ESP32 DAC through the ULP (Ultra> Low Power coprocessor), freeing I2S for other uses. Connect left channel on pin 25 Connect right channel on pin 26. More...
#include <AudioESP32ULP.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 | |
int | availableForWrite () |
virtual bool | begin () |
bool | begin (AudioInfo info) |
Starts the processing. I the output is mono, we can determine the output pin by selecting DAC1 (gpio25) or DAC2 (gpio26) | |
virtual void | clearNotifyAudioChange () |
Deletes all change notify subscriptions. | |
AudioInfo | defaultConfig () |
void | end () |
virtual void | flush () |
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 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 | setMinWriteBytes (int bytes) |
Selects the limit for the availableForWrite to report the data. | |
void | setMonoDAC (UlpDac dac) |
Selects the DAC when we have a mono signal. | |
void | setNotifyActive (bool flag) |
Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
size_t | write (const uint8_t *data, size_t len) |
virtual size_t | write (uint8_t ch) override |
virtual void | writeSilence (size_t len) |
Protected Member Functions | |
uint32_t | create_I_BXI (uint32_t imm_pc) |
uint32_t | create_I_WR_REG (uint32_t reg, uint32_t low_bit, uint32_t high_bit, uint32_t val) |
void | notifyAudioChange (AudioInfo info) |
bool | setup () |
bool | writeFrame (int16_t sample[2]) |
Protected Attributes | |
int | _timeout = 10 |
int | activeDACs = 3 |
uint8_t | bufferedOddSample = 128 |
const uint32_t | bufferStart = indexAddress + 1 |
AudioInfo | cfg |
const uint32_t | dacTableStart1 = 2048 - 512 |
const uint32_t | dacTableStart2 = dacTableStart1 - 512 |
int | hertz |
const uint32_t | indexAddress = opcodeCount |
bool | is_active = false |
bool | is_notify_active = true |
int | lastFilledWord = 0 |
int | min_write_bytes = 128 |
Vector< AudioInfoSupport * > | notify_vector |
const int | opcodeCount = 20 |
UlpDac | selected_mono_dac = ULP_DAC1 |
bool | stereoOutput = true |
SingleBuffer< uint8_t > | tmp {MAX_SINGLE_CHARS} |
int | tmpPos = 0 |
const int | totalSamples = totalSampleWords * 2 |
uint32_t | totalSampleWords |
bool | waitingOddSample = true |
Outputs to ESP32 DAC through the ULP (Ultra> Low Power coprocessor), freeing I2S for other uses. Connect left channel on pin 25 Connect right channel on pin 26.
|
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.
|
inlinevirtual |
Reimplemented from AudioOutput.
Reimplemented in AudioOutputWithCallback, EncodedAudioOutput, OggContainerOutput, AudioFFTBase, MetaDataFilter, and CsvOutput< T >.
Starts the processing. I the output is mono, we can determine the output pin by selecting DAC1 (gpio25) or DAC2 (gpio26)
Reimplemented from AudioOutput.
|
inlinevirtual |
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.
Defines the input AudioInfo.
Implements AudioInfoSupport.
Reimplemented in ChannelsSelectOutput, AdapterPrintToAudioOutput, MultiOutput, AudioFFTBase, AdapterAudioStreamToAudioOutput, CsvOutput< T >, PWMAudioOutput, and EncodedAudioOutput.
Implements AudioOutput.
Reimplemented in OversamplingDAC.
Writes n 0 values (= silence)
len |
|
protected |