|
arduino-audio-tools
|
Replicates the output to multiple destinations. More...
#include <CodecTSDemux.h>
Classes | |
| struct | MultiOutputRecord |
| Record describing a single replicated output. More... | |
Public Member Functions | |
| MultiOutput ()=default | |
| Defines a MultiOutput with no final output: Define your outputs with add(). | |
| MultiOutput (AudioOutput &out) | |
| Defines a MultiOutput with a single final outputs,. | |
| MultiOutput (AudioOutput &out1, AudioOutput &out2) | |
| Defines a MultiOutput with 2 final outputs. | |
| MultiOutput (AudioStream &out) | |
| MultiOutput (AudioStream &out1, AudioStream &out2) | |
| Defines a MultiOutput with 2 final outputs. | |
| MultiOutput (Print &out) | |
| MultiOutput (Print &out1, Print &out2) | |
| virtual | ~MultiOutput () |
| void | add (AudioOutput &out) |
| Add an additional AudioOutput output. | |
| void | add (AudioStream &stream) |
| Add an AudioStream to the output. | |
| void | add (Client &client) |
| Add a (network) Client as output: e.g. WiFiClient, EthernetClient... | |
| void | add (Print &print) |
| virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
| Adds target to be notified about audio changes. | |
| virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
| Adds target to be notified about audio changes. | |
| virtual AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| virtual AudioInfo | audioInfoOut () |
| virtual int | availableForWrite () override |
| virtual int | availableForWrite () override |
| virtual bool | begin () |
| virtual bool | begin () |
| virtual bool | begin (AudioInfo info) |
| virtual bool | begin (AudioInfo info) |
| void | clear () |
| void | clearInactive () |
| virtual void | clearNotifyAudioChange () |
| Deletes all change notify subscriptions. | |
| virtual void | clearNotifyAudioChange () |
| Deletes all change notify subscriptions. | |
| virtual void | end () |
| virtual void | end () |
| void | flush () |
| virtual bool | isDeletable () |
| If true we need to release the related memory in the destructor. | |
| 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. | |
| bool | isNotifyActive () |
| Checks if the automatic AudioInfo update is active. | |
| virtual | operator bool () |
| virtual | operator bool () |
| void | remove (Print &print) |
| Removes the indicated output. | |
| virtual bool | removeNotifyAudioChange (AudioInfoSupport &bi) |
| Removes a target in order not to be notified about audio changes. | |
| virtual bool | removeNotifyAudioChange (AudioInfoSupport &bi) |
| Removes a target in order not to be notified about audio changes. | |
| void | setAudioInfo (AudioInfo info) |
| Defines the input AudioInfo. | |
| void | setNotifyActive (bool flag) |
| Deactivate/Reactivate automatic AudioInfo updates: (default is active). | |
| void | setNotifyActive (bool flag) |
| Deactivate/Reactivate automatic AudioInfo updates: (default is active). | |
| size_t | write (const uint8_t *data, size_t len) override |
| size_t | write (uint8_t ch) override |
| virtual void | writeSilence (size_t len) |
| virtual void | writeSilence (size_t len) |
Protected Types | |
| enum class | Kind { PrintKind , ClientKind , AudioStreamKind , AudioOutputKind } |
Protected Member Functions | |
| bool | isActive (MultiOutputRecord &rec) |
| void | notifyAudioChange (AudioInfo info) |
| void | notifyAudioChange (AudioInfo info) |
| void | setOutput (Print &out) |
| support for Pipleline | |
Protected Attributes | |
| int | _timeout = 10 |
| AudioInfo | cfg |
| bool | is_active = false |
| bool | is_notify_active = true |
| Vector< AudioInfoSupport * > | notify_vector |
| SingleBuffer< uint8_t > | tmp { 8 } |
| int | tmpPos = 0 |
| Vector< MultiOutputRecord > | vector |
Replicates the output to multiple destinations.
|
strongprotected |
Identifies the actual type behind the stored Print pointer so that clearInactive() can safely static_cast back to call operator bool()
| Enumerator | |
|---|---|
| PrintKind | |
| ClientKind | |
| AudioStreamKind | |
| AudioOutputKind | |
|
default |
Defines a MultiOutput with no final output: Define your outputs with add().
|
inline |
|
inline |
Defines a MultiOutput with a single final outputs,.
|
inline |
|
inline |
Defines a MultiOutput with 2 final outputs.
|
inline |
Defines a MultiOutput with 2 final outputs.
Defines a MultiOutput with 2 final outputs: Warning no support for AudioInfo notifications. It is recommended to use individual add calls.
|
inlinevirtual |
|
inline |
Add an additional AudioOutput output.
|
inline |
Add an AudioStream to the output.
|
inline |
Add a (network) Client as output: e.g. WiFiClient, EthernetClient...
|
inline |
|
inlinevirtualinherited |
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, CodecNOP, EncodedAudioOutput, and EncodedAudioStream.
|
inlinevirtualinherited |
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, CodecNOP, EncodedAudioOutput, and EncodedAudioStream.
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in AdapterAudioStreamToAudioOutput, AdapterPrintToAudioOutput, AdapterAudioStreamToAudioOutput, AdapterPrintToAudioOutput, EncodedAudioOutput, and EncodedAudioOutput.
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in AdapterAudioStreamToAudioOutput, AdapterPrintToAudioOutput, AdapterAudioStreamToAudioOutput, AdapterPrintToAudioOutput, EncodedAudioOutput, and EncodedAudioOutput.
|
inlinevirtualinherited |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in ChannelFormatConverterStream, ChannelFormatConverterStreamT< T >, FormatConverterStream, MP3EncoderShine, NumberFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, Pipeline, PureDataStream, PWMAudioOutput< PWMDriverT >, ResampleStream, ResampleStreamT< TInterpolator >, and SupportedRatesStream.
|
inlinevirtualinherited |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in ChannelFormatConverterStream, ChannelFormatConverterStreamT< T >, FormatConverterStream, MP3EncoderShine, NumberFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, Pipeline, PureDataStream, PWMAudioOutput< PWMDriverT >, ResampleStream, ResampleStreamT< TInterpolator >, and SupportedRatesStream.
|
inlineoverridevirtualinherited |
Reimplemented from Print.
Reimplemented in AdapterAudioStreamToAudioOutput, AdapterAudioStreamToAudioOutput, CsvOutput< T >, CsvOutput< T >, EncodedAudioOutput, MemoryOutput, MemoryOutput, AudioESP32ULP, AudioServerEx, AudioSyncWriter, CsvOutput< T >, EncodedAudioOutput, MemoryOutput, PWMAudioOutput< PWMDriverT >, RTSPOutput< Platform >, and SPIAudioMaster.
|
inlineoverridevirtualinherited |
Reimplemented from Print.
Reimplemented in AdapterAudioStreamToAudioOutput, AdapterAudioStreamToAudioOutput, CsvOutput< T >, CsvOutput< T >, EncodedAudioOutput, MemoryOutput, MemoryOutput, AudioESP32ULP, AudioServerEx, AudioSyncWriter, CsvOutput< T >, EncodedAudioOutput, MemoryOutput, PWMAudioOutput< PWMDriverT >, RTSPOutput< Platform >, and SPIAudioMaster.
|
inlinevirtualinherited |
Reimplemented in AdapterAudioStreamToAudioOutput, AdapterAudioStreamToAudioOutput, ChannelsSelectOutput, CsvOutput< T >, CsvOutput< T >, EncodedAudioOutput, HexDumpOutput, HexDumpOutput, MemoryOutput, MemoryOutput, AudioServerEx, ChannelsSelectOutput, CsvOutput< T >, EncodedAudioOutput, FFTEffect, FFTEqualizer, FFTPitchShift, HexDumpOutput, MemoryOutput, MetaDataFilter, OggContainerOutput, OSCContainerEncoder::OSCOutput, PitchShiftOutput< T, BufferT >, PWMAudioOutput< PWMDriverT >, R2ROutput, RTSPOutput< Platform >, and RTTTLOutput< T >.
|
inlinevirtualinherited |
Reimplemented in AdapterAudioStreamToAudioOutput, AdapterAudioStreamToAudioOutput, ChannelsSelectOutput, CsvOutput< T >, CsvOutput< T >, EncodedAudioOutput, HexDumpOutput, HexDumpOutput, MemoryOutput, MemoryOutput, AudioServerEx, ChannelsSelectOutput, CsvOutput< T >, EncodedAudioOutput, FFTEffect, FFTEqualizer, FFTPitchShift, HexDumpOutput, MemoryOutput, MetaDataFilter, OggContainerOutput, OSCContainerEncoder::OSCOutput, PitchShiftOutput< T, BufferT >, PWMAudioOutput< PWMDriverT >, R2ROutput, RTSPOutput< Platform >, and RTTTLOutput< T >.
|
inlinevirtualinherited |
Reimplemented in ChannelsSelectOutput, CsvOutput< T >, CsvOutput< T >, and EncodedAudioOutput.
|
inlinevirtualinherited |
Reimplemented in ChannelsSelectOutput, CsvOutput< T >, CsvOutput< T >, and EncodedAudioOutput.
|
inline |
Removes all output components: the referenced Print/AudioOutput/ AudioStream/Client objects are never owned by MultiOutput, so no memory needs to be released here.
|
inline |
Removes all outputs which are no longer active. Client, AudioStream and AudioOutput provide an operator bool() which is used to determine if the output is still active; plain Print outputs cannot be checked and are always kept.
|
inlinevirtualinherited |
Deletes all change notify subscriptions.
Reimplemented in RTSPClient< TcpClient, UdpSocket >, RTSPClient< EthernetClient, EthernetUDP >, and RTSPClient< WiFiClient, WiFiUDP >.
|
inlinevirtualinherited |
Deletes all change notify subscriptions.
Reimplemented in RTSPClient< TcpClient, UdpSocket >, RTSPClient< EthernetClient, EthernetUDP >, and RTSPClient< WiFiClient, WiFiUDP >.
|
inlinevirtualinherited |
Reimplemented in AdapterAudioStreamToAudioOutput, AdapterAudioStreamToAudioOutput, EncodedAudioOutput, AudioESP32ULP, AudioServerEx, AudioSyncWriter, EncodedAudioOutput, MetaDataFilter, MetaDataOutput, OggContainerOutput, OpusOggWriter, PitchShiftOutput< T, BufferT >, PWMAudioOutput< PWMDriverT >, RTSPOutput< Platform >, and SPIAudioMaster.
|
inlinevirtualinherited |
Reimplemented in AdapterAudioStreamToAudioOutput, AdapterAudioStreamToAudioOutput, EncodedAudioOutput, AudioESP32ULP, AudioServerEx, AudioSyncWriter, EncodedAudioOutput, MetaDataFilter, MetaDataOutput, OggContainerOutput, OpusOggWriter, PitchShiftOutput< T, BufferT >, PWMAudioOutput< PWMDriverT >, RTSPOutput< Platform >, and SPIAudioMaster.
|
inlinevirtual |
Reimplemented from AudioOutput.
|
inlineprotected |
Determines if the output is still active: Client, AudioStream and AudioOutput support this via their operator bool(); plain Print outputs cannot be checked and are always reported as active.
|
inlinevirtualinherited |
If true we need to release the related memory in the destructor.
Reimplemented in AdapterAudioStreamToAudioOutput, AdapterPrintToAudioOutput, AdapterAudioStreamToAudioOutput, and AdapterPrintToAudioOutput.
|
inlinevirtualinherited |
If true we need to release the related memory in the destructor.
Reimplemented in AdapterAudioStreamToAudioOutput, AdapterPrintToAudioOutput, AdapterAudioStreamToAudioOutput, and AdapterPrintToAudioOutput.
|
inlineinherited |
Checks if the automatic AudioInfo update is active.
|
inlineinherited |
Checks if the automatic AudioInfo update is active.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlinevirtualinherited |
Reimplemented in AdapterAudioStreamToAudioOutput, AdapterAudioStreamToAudioOutput, EncodedAudioOutput, EncodedAudioOutput, and RTSPOutput< Platform >.
|
inlinevirtualinherited |
Reimplemented in AdapterAudioStreamToAudioOutput, AdapterAudioStreamToAudioOutput, EncodedAudioOutput, EncodedAudioOutput, and RTSPOutput< Platform >.
|
inline |
Removes the indicated output.
|
inlinevirtualinherited |
Removes a target in order not to be notified about audio changes.
|
inlinevirtualinherited |
Removes a target in order not to be notified about audio changes.
|
inlinevirtual |
Defines the input AudioInfo.
Reimplemented from AudioOutput.
|
inlineinherited |
Deactivate/Reactivate automatic AudioInfo updates: (default is active).
|
inlineinherited |
Deactivate/Reactivate automatic AudioInfo updates: (default is active).
|
inlineprotectedvirtual |
support for Pipleline
Implements ModifyingOutput.
|
inlineoverridevirtual |
Implements AudioOutput.
|
inlineoverridevirtual |
Reimplemented from AudioOutput.
|
inlinevirtualinherited |
Writes n 0 values (= silence)
| len |
|
inlinevirtualinherited |
Writes n 0 values (= silence)
| len |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |