|
arduino-audio-tools
|
Channel converter which does not use a template. More...
#include <AudioStreamsConverter.h>
Public Member Functions | |
| ChannelFormatConverterStream ()=default | |
| ChannelFormatConverterStream (ChannelFormatConverterStream &from) | |
| ChannelFormatConverterStream (Print &print) | |
| ChannelFormatConverterStream (Stream &stream) | |
| virtual | ~ChannelFormatConverterStream () |
| virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
| Adds target to be notified about audio changes. | |
| virtual AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| AudioInfo | audioInfoOut () override |
| Returns the AudioInfo with the to_channels. | |
| virtual int | available () override |
| virtual int | availableForWrite () override |
| bool | begin () override |
| bool | begin (AudioInfo cfg, int toChannels) |
| bool | begin (AudioInfo from, AudioInfo to) |
| virtual void | clearNotifyAudioChange () |
| Deletes all change notify subscriptions. | |
| void | end () override |
| virtual void | flush () |
| float | getByteFactor () override |
| virtual Print * | getPrint () |
| virtual Stream * | getStream () |
| bool | isNotifyActive () |
| Checks if the automatic AudioInfo update is active. | |
| virtual | operator bool () |
| ChannelFormatConverterStream & | operator= (ChannelFormatConverterStream &from) |
| 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 | resizeReadResultQueue (int size) |
| void | setAudioInfo (AudioInfo cfg) override |
| Defines the input AudioInfo. | |
| void | setMaxReadSize (int size) |
| Defines the read buffer size for individual reads: same as transformationReader().setMaxReadSize(size) | |
| void | setNotifyActive (bool flag) |
| Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
| virtual void | setOutput (AudioOutput &print) |
| Defines/Changes the output target and registers for audio change notifications. | |
| virtual void | setOutput (Print &print) override |
| Defines/Changes the output target. | |
| void | setReadResultQueueSize (int size) |
| same as resizeReadResultQueue(size) | |
| virtual void | setStream (AudioStream &stream) |
| Defines/Changes the input & output and registers for audio change notifications. | |
| virtual void | setStream (Stream &stream) override |
| Defines/Changes the input & output. | |
| void | setToChannels (uint16_t channels) |
| void | setWriteBufferSize (int size) |
| virtual TransformationReader< ReformatBaseStream > & | transformationReader () |
| Provides access to the TransformationReader. | |
| virtual 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 | |
| void | cleanupConverter () |
| void | copy (ChannelFormatConverterStream &from) |
| template<typename T > | |
| ChannelFormatConverterStreamT< T > * | getConverter () |
| virtual int | not_supported (int out, const char *msg="") |
| void | notifyAudioChange (AudioInfo info) |
| void | refillReadBuffer () |
| Refill small read buffer (e.g. 8 bytes) to avoid single byte reads when calling read() | |
| bool | setupConverter (int fromChannels, int toChannels) |
| void | setupReader () |
Protected Attributes | |
| int | _timeout = 10 |
| int | bits_per_sample = 0 |
| void * | converter = nullptr |
| int | from_channels = 2 |
| AudioInfo | info |
| bool | is_active = false |
| bool | is_notify_active = true |
| Vector< AudioInfoSupport * > | notify_vector |
| Print * | p_print = nullptr |
| Stream * | p_stream = nullptr |
| TransformationReader< ReformatBaseStream > | reader |
| RingBuffer< uint8_t > | tmp_in {0} |
| RingBuffer< uint8_t > | tmp_out {0} |
| int | to_channels = 2 |
| int | write_buffer_size = MAX_SINGLE_CHARS |
Channel converter which does not use a template.
|
default |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtualinherited |
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, EncodedAudioOutput, EncodedAudioStream, AACDecoderFDK, DecoderBasic, CodecChain, MP3DecoderHelix, MP3DecoderMAD, OggContainerDecoder, RTSPClient< TcpClient, UdpSocket >, Pipeline, and Pipeline::ModifyingStreamAdapter.
|
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 |
Returns the AudioInfo with the to_channels.
Reimplemented from AudioInfoSupport.
|
inlineoverridevirtual |
Reimplemented from BaseStream.
|
inlineoverridevirtual |
Reimplemented from BaseStream.
|
inlineoverridevirtual |
Reimplemented from BaseStream.
|
inline |
|
inlineprotected |
|
inlinevirtualinherited |
Deletes all change notify subscriptions.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
|
inlineprotected |
|
inlineoverridevirtual |
Reimplemented from BaseStream.
|
inlinevirtualinherited |
Called by TransformationReader when EOF is detected on the source stream. Override in subclasses to flush any internally buffered encoder/decoder data into the current output (which at that point is the result_queue). Do NOT call the full end()/begin() cycle here – that would destroy the reader's own buffers and reset the is_eof flag.
Reimplemented from BaseStream.
Reimplemented in ResampleStream, and EncodedAudioStream.
|
inlineoverridevirtual |
Implements ReformatBaseStream.
|
inlineprotected |
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
inlineinherited |
Checks if the automatic AudioInfo update is active.
|
inlineprotectedvirtualinherited |
|
inlineprotectedinherited |
|
inlinevirtualinherited |
|
inline |
|
inlineoverridevirtual |
Reimplemented from AudioStream.
|
inlinevirtualinherited |
Source to generate silence: just sets the buffer to 0.
|
inlineprotectedinherited |
Refill small read buffer (e.g. 8 bytes) to avoid single byte reads when calling read()
|
inlinevirtualinherited |
Removes a target in order not to be notified about audio changes.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
|
inlineinherited |
Define the size of the interal read result queue: same as transformationReader().resizeResultQueue(size)
|
inlineoverridevirtual |
Defines the input AudioInfo.
Reimplemented from AudioStream.
|
inlineinherited |
Defines the read buffer size for individual reads: same as transformationReader().setMaxReadSize(size)
|
inlineinherited |
Deactivate/Reactivate automatic AudioInfo updates: (default is active)
|
inlinevirtualinherited |
Defines/Changes the output target and registers for audio change notifications.
Reimplemented from ModifyingStream.
Reimplemented in FormatConverterStream, and EncodedAudioStream.
|
inlineoverridevirtualinherited |
Defines/Changes the output target.
Implements ModifyingStream.
Reimplemented in EncodedAudioStream, and FormatConverterStream.
|
inlineinherited |
same as resizeReadResultQueue(size)
|
inlinevirtualinherited |
Defines/Changes the input & output and registers for audio change notifications.
Reimplemented from ModifyingStream.
Reimplemented in FormatConverterStream, and EncodedAudioStream.
|
inlineoverridevirtualinherited |
Defines/Changes the input & output.
Implements ModifyingStream.
Reimplemented in FormatConverterStream, and EncodedAudioStream.
|
inline |
|
inlineprotected |
|
inlineprotectedinherited |
|
inlineinherited |
|
inlinevirtualinherited |
Provides access to the TransformationReader.
|
inlineoverridevirtual |
Reimplemented from AudioStream.
|
inlineoverridevirtualinherited |
Reimplemented in MemoryStream, AudioStreamWrapper, BufferedTaskStream, RingBufferStream, BufferedStream, and URLStream.
|
inlinevirtualinherited |
Writes len bytes of silence (=0).
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protectedinherited |