|
arduino-audio-tools
|
A more natural Print class to process encoded data (aac, wav, mp3...). Just define the output and the decoder and write the encoded data. More...
#include <AudioEncoded.h>
Public Member Functions | |
| EncodedAudioOutput (AudioDecoder *decoder) | |
| EncodedAudioOutput (AudioEncoder *encoder) | |
| EncodedAudioOutput (AudioOutput *outputStream, AudioDecoder *decoder) | |
| EncodedAudioOutput (AudioOutput *outputStream, AudioEncoder *encoder) | |
| EncodedAudioOutput (AudioStream *outputStream, AudioDecoder *decoder) | |
| EncodedAudioOutput (AudioStream *outputStream, AudioEncoder *encoder) | |
| EncodedAudioOutput (Print *outputStream, AudioDecoder *decoder) | |
| EncodedAudioOutput (Print *outputStream, AudioEncoder *encoder) | |
| void | addNotifyAudioChange (AudioInfoSupport &bi) override |
| Define object which need to be notified if the basinfo is changing. | |
| AudioInfo | audioInfo () override |
| Provide audio info from decoder if relevant. | |
| virtual AudioInfo | audioInfoOut () |
| int | availableForWrite () override |
| bool | begin () override |
| Starts the processing - sets the status to active. | |
| virtual bool | begin (AudioInfo newInfo) override |
| Starts the processing - sets the status to active. | |
| virtual void | clearNotifyAudioChange () |
| Deletes all change notify subscriptions. | |
| AudioDecoder & | decoder () |
| Provides the initialized decoder. | |
| AudioInfo | defaultConfig () |
| AudioEncoder & | encoder () |
| Provides the initialized encoder. | |
| void | end () override |
| Ends the processing. | |
| virtual void | flush () |
| AudioDecoder * | getDecoder () |
| AudioEncoder * | getEncoder () |
| bool | isCheckAvailableForWrite () |
| Is Available for Write check activated ? | |
| 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. | |
| operator bool () override | |
| Returns true if status is active and we still have data to be processed. | |
| EncodedAudioOutput & | operator= (EncodedAudioOutput const &src) |
| 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 | setDecoder (AudioDecoder *decoder) |
| void | setEncoder (AudioEncoder *encoder) |
| void | setFrameSize (int size) |
| defines the size of the decoded frame in bytes | |
| void | setNotifyActive (bool flag) |
| Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
| void | setOutput (AudioOutput &outputStream) |
| void | setOutput (AudioOutput *out) |
| void | setOutput (AudioStream &outputStream) |
| void | setOutput (AudioStream *out) |
| void | setOutput (Print &outputStream) override |
| Defines/Changes the output target. | |
| void | setOutput (Print *outputStream) |
| Defines the output. | |
| virtual size_t | write (const uint8_t *data, size_t len) override |
| encoder decode the data | |
| virtual size_t | write (uint8_t ch) override |
| virtual void | writeSilence (size_t len) |
Protected Member Functions | |
| void | notifyAudioChange (AudioInfo info) |
Protected Attributes | |
| int | _timeout = 10 |
| bool | active = false |
| AudioInfo | cfg |
| bool | check_available_for_write = false |
| AudioDecoder * | decoder_ptr = undefined |
| AudioEncoder * | encoder_ptr = undefined |
| int | frame_size = DEFAULT_BUFFER_SIZE |
| bool | is_active = false |
| bool | is_notify_active = true |
| Vector< AudioInfoSupport * > | notify_vector |
| Print * | ptr_out = nullptr |
| SingleBuffer< uint8_t > | tmp {MAX_SINGLE_CHARS} |
| int | tmpPos = 0 |
| AudioInfoSupport * | to_notify = nullptr |
| CodecNOP * | undefined = CodecNOP::instance() |
| AudioWriter * | writer_ptr = nullptr |
A more natural Print class to process encoded data (aac, wav, mp3...). Just define the output and the decoder and write the encoded data.
|
inlineoverridevirtual |
Define object which need to be notified if the basinfo is changing.
Reimplemented from AudioInfoSource.
|
inlineoverridevirtual |
Provide audio info from decoder if relevant.
Reimplemented from AudioOutput.
|
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, ResampleStream, and ResampleStreamT< TInterpolator >.
|
inlineoverridevirtual |
Reimplemented from AudioOutput.
|
inlineoverridevirtual |
Starts the processing - sets the status to active.
Reimplemented from AudioOutput.
|
inlineoverridevirtual |
Starts the processing - sets the status to active.
Reimplemented from AudioOutput.
|
inlinevirtualinherited |
Deletes all change notify subscriptions.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
|
inlineoverridevirtual |
Ends the processing.
Reimplemented from AudioOutput.
|
inlinevirtualinherited |
Reimplemented from Print.
|
inlinevirtualinherited |
If true we need to release the related memory in the destructor.
Reimplemented in AdapterPrintToAudioOutput, and AdapterAudioStreamToAudioOutput.
|
inlineoverridevirtual |
Returns true if status is active and we still have data to be processed.
Reimplemented from AudioOutput.
|
inlinevirtualinherited |
Removes a target in order not to be notified about audio changes.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
|
inlineoverridevirtual |
Defines the input AudioInfo.
Reimplemented from AudioOutput.
|
inlineoverridevirtual |
Defines/Changes the output target.
Implements ModifyingOutput.
|
inlineoverridevirtual |
encoder decode the data
Implements AudioOutput.
|
inlinevirtualinherited |
Writes n 0 values (= silence)
| len |