|
arduino-audio-tools
|
We can build a input or an output chain: an input chain starts with setInput(); followed by add() an output chain consinsts of add() and ends with setOutput();. More...
#include <Pipeline.h>
Classes | |
| struct | ModifyingStreamAdapter |
| Support for ModifyingOutput. More... | |
Public Member Functions | |
| bool | add (ModifyingOutput &out) |
| adds a component | |
| bool | add (ModifyingStream &io) |
| adds a component | |
| void | addNotifyAudioChange (AudioInfoSupport &bi) override |
| Subscribes to notifications on last component of the chain. | |
| virtual AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| AudioInfo | audioInfoOut () override |
| Provides the resulting AudioInfo from the last node. | |
| int | available () override |
| int | availableForWrite () override |
| bool | begin () override |
| Optional method: Calls begin on all components. | |
| bool | begin (AudioInfo info) |
| virtual void | clearNotifyAudioChange () |
| Deletes all change notify subscriptions. | |
| void | end () override |
| Calls end on all components. | |
| virtual void | flush () override |
| bool | hasComponents () |
| Returns true if we have at least 1 component. | |
| bool | isActive () |
| Determines if the pipeline is active. | |
| bool | isNotifyActive () |
| Checks if the automatic AudioInfo update is active. | |
| bool | isOK () |
| Returns true if pipeline is correctly set up. | |
| ModifyingStream & | last () |
| Provides the last component. | |
| operator bool () override | |
| Returns true if pipeline is correctly set up and is active. | |
| ModifyingStream & | operator[] (int idx) |
| Access to the components by index. | |
| size_t | readBytes (uint8_t *data, size_t len) override |
| virtual size_t | readSilence (uint8_t *buffer, size_t length) |
| Source to generate silence: just sets the buffer to 0. | |
| virtual bool | removeNotifyAudioChange (AudioInfoSupport &bi) |
| Removes a target in order not to be notified about audio changes. | |
| void | setActive (bool flag) |
| Activates/deactivates the pipeline (default is active) | |
| void | setAudioInfo (AudioInfo newInfo) override |
| Defines the AudioInfo for the first node. | |
| bool | setInput (AudioStream &in) |
| Defines the input for an input pipeline: must be first call before add() | |
| bool | setInput (Stream &in) |
| Defines the input for an input pipeline: must be first call before add() | |
| void | setNotifyActive (bool flag) |
| Activates/deactivates notifications. | |
| bool | setOutput (AudioOutput &out) |
| Defines the output for an output pipeline: must be last call after add() | |
| bool | setOutput (AudioStream &out) |
| Defines the output for an output pipeline: must be last call after add() | |
| bool | setOutput (Print &out) |
| Defines the output for an output pipeline: must be last call after add() | |
| void | setWriteBufferSize (int size) |
| int | size () |
| Provides the number of components. | |
| size_t | write (const uint8_t *data, size_t len) override |
| virtual size_t | write (uint8_t ch) override |
| virtual void | writeSilence (size_t len) |
| Writes len bytes of silence (=0). | |
Protected Member Functions | |
| Stream * | getInput () |
| virtual int | not_supported (int out, const char *msg="") |
| void | notifyAudioChange (AudioInfo info) |
| void | refillReadBuffer () |
Protected Attributes | |
| int | _timeout = 10 |
| Vector< ModifyingStream * > | cleanup {0} |
| Vector< ModifyingStream * > | components {0} |
| bool | has_input = false |
| bool | has_output = false |
| AudioInfo | info |
| bool | is_active = true |
| bool | is_notify_active = true |
| bool | is_ok = true |
| Vector< AudioInfoSupport * > | notify_vector |
| AudioStream * | p_ai_input = nullptr |
| AudioInfoSource * | p_ai_source = nullptr |
| AudioOutput * | p_out_print = nullptr |
| AudioStream * | p_out_stream = nullptr |
| Print * | p_print = nullptr |
| Stream * | p_stream = nullptr |
| RingBuffer< uint8_t > | tmp_in {0} |
| RingBuffer< uint8_t > | tmp_out {0} |
| int | write_buffer_size = MAX_SINGLE_CHARS |
We can build a input or an output chain: an input chain starts with setInput(); followed by add() an output chain consinsts of add() and ends with setOutput();.
|
inlineoverridevirtual |
Subscribes to notifications on last component of the chain.
Reimplemented from AudioInfoSource.
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in JupyterAudioT< T >, MozziStream, TimerCallbackAudioStream, EncodedAudioStream, PureDataStream, AdapterAudioOutputToAudioStream, GeneratedSoundStream< T >, GeneratedSoundStream< int16_t >, and InputMerge< T >.
|
inlineoverridevirtual |
Provides the resulting AudioInfo from the last node.
Reimplemented from AudioInfoSupport.
|
inlineoverridevirtual |
Reimplemented from BaseStream.
|
inlineoverridevirtual |
Reimplemented from BaseStream.
|
inlineoverridevirtual |
Optional method: Calls begin on all components.
Reimplemented from BaseStream.
|
inline |
Optional method: Calls begin on all components and setAudioInfo on first coponent to update the full chain
|
inlinevirtualinherited |
Deletes all change notify subscriptions.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
|
inlineoverridevirtual |
Calls end on all components.
Reimplemented from BaseStream.
|
inlineoverridevirtualinherited |
Reimplemented from Print.
Reimplemented in ResampleStream, BufferedTaskStream, and BufferedStream.
|
inlineprotected |
we read from the last node or the defined input: null if no input is available
|
inlineoverridevirtual |
Returns true if pipeline is correctly set up and is active.
Reimplemented from AudioStream.
|
inlineoverridevirtual |
Reimplemented from AudioStream.
|
inlinevirtualinherited |
Removes a target in order not to be notified about audio changes.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
|
inlineoverridevirtual |
Defines the AudioInfo for the first node.
Reimplemented from AudioStream.
|
inlineoverridevirtual |
Reimplemented from AudioStream.
|
inlineoverridevirtualinherited |
Reimplemented in BufferedTaskStream, and BufferedStream.