arduino-audio-tools
|
Stream Wrapper which can be used to print the values as readable ASCII to the screen to be analyzed in the Serial Plotter The frames are separated by a new line. The channels in one frame are separated by a ,. More...
#include <AudioOutput.h>
Public Member Functions | |
CsvOutput (int buffer_size=DEFAULT_BUFFER_SIZE, bool active=true) | |
CsvOutput (Print &out, int channels=2, int buffer_size=DEFAULT_BUFFER_SIZE, bool active=true) | |
Constructor. | |
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 () |
int | availableForWrite () override |
bool | begin () override |
(Re)start (e.g. if channels is set in constructor) | |
bool | begin (AudioInfo info) override |
Starts the processing with the defined number of channels. | |
bool | begin (int channels) |
Starts the processing with the defined number of channels. | |
virtual void | clearNotifyAudioChange () |
Deletes all change notify subscriptions. | |
AudioInfo | defaultConfig () |
Provides the default configuration. | |
AudioInfo | defaultConfig (RxTxMode mode) |
const char * | delimiter () |
Provides the current column delimiter. | |
virtual 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 info) override |
defines the number of channels | |
void | setDelimiter (const char *del) |
Defines an alternative (column) delimiter. The default is ,. | |
void | setNotifyActive (bool flag) |
Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
virtual size_t | write (const uint8_t *data, size_t len) override |
Writes the data - formatted as CSV - to the output stream. | |
virtual size_t | write (uint8_t ch) override |
virtual void | writeSilence (size_t len) |
Protected Member Functions | |
void | notifyAudioChange (AudioInfo info) |
void | writeFrames (T *data_ptr, int frameCount) |
Protected Attributes | |
int | _timeout = 10 |
AudioInfo | cfg |
int | channel = 0 |
T * | data_ptr |
const char * | delimiter_str = "," |
bool | is_active = false |
bool | is_notify_active = true |
Vector< AudioInfoSupport * > | notify_vector |
Print * | out_ptr = &Serial |
SingleBuffer< uint8_t > | tmp {MAX_SINGLE_CHARS} |
int | tmpPos = 0 |
Stream Wrapper which can be used to print the values as readable ASCII to the screen to be analyzed in the Serial Plotter The frames are separated by a new line. The channels in one frame are separated by a ,.
T |
|
inlinevirtualinherited |
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, MP3DecoderMAD, EncodedAudioOutput, EncodedAudioStream, AACDecoderFDK, DecoderBasic, MP3DecoderHelix, OggContainerDecoder, Pipeline, and Pipeline::ModifyingStreamAdapter.
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in AdapterPrintToAudioOutput, and AdapterAudioStreamToAudioOutput.
|
inlinevirtualinherited |
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.
|
inlineoverridevirtual |
Reimplemented from AudioOutput.
|
inlineoverridevirtual |
(Re)start (e.g. if channels is set in constructor)
Reimplemented from AudioOutput.
|
inlineoverridevirtual |
Starts the processing with the defined number of channels.
Reimplemented from AudioOutput.
|
inlinevirtualinherited |
Reimplemented in EncodedAudioOutput, and OggContainerOutput.
|
inlinevirtualinherited |
Reimplemented from Print.
|
inlinevirtualinherited |
If true we need to release the related memory in the destructor.
Reimplemented in AdapterPrintToAudioOutput, and AdapterAudioStreamToAudioOutput.
|
inlinevirtualinherited |
Reimplemented in EncodedAudioOutput, and RTSPOutput.
|
inlineoverridevirtual |
defines the number of channels
Reimplemented from AudioOutput.
|
inlineoverridevirtual |
Writes the data - formatted as CSV - to the output stream.
Implements AudioOutput.
|
inlinevirtualinherited |
Writes n 0 values (= silence)
len |