arduino-audio-tools
Loading...
Searching...
No Matches
InputMixer< T, SumT > Class Template Reference

MixerStream is mixing the input from Multiple Input Streams. All streams must have the same audo format (sample rate, channels, bits per sample). More...

#include <CodecOpusOgg.h>

Inheritance diagram for InputMixer< T, SumT >:
AudioStream AudioStream AudioInfoSource AudioInfoSupport BaseStream AudioInfoSource AudioInfoSupport BaseStream AudioInfoSource AudioInfoSupport BaseStream AudioInfoSource AudioInfoSupport BaseStream

Public Member Functions

 InputMixer ()=default
 InputMixer ()=default
int add (Stream &in, int weight=100)
 Adds a new input stream and returns it's actual index position.
int add (Stream &in, int weight=100)
 Adds a new input stream and returns it's actual index position.
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 ()
int available () override
int available () override
virtual int availableForWrite () override
virtual int availableForWrite () override
virtual bool begin ()
virtual bool begin (AudioInfo info)
virtual bool begin (AudioInfo info)
virtual void clearNotifyAudioChange ()
 Deletes all change notify subscriptions.
virtual void clearNotifyAudioChange ()
 Deletes all change notify subscriptions.
void end () override
 Remove all input streams.
void end () override
 Remove all input streams.
virtual void flush () override
virtual void flush () override
int indexOf (Stream &stream)
 Provides the actual index of the stream.
int indexOf (Stream &stream)
 Provides the actual index of the stream.
bool isNotifyActive ()
 Checks if the automatic AudioInfo update is active.
bool isNotifyActive ()
 Checks if the automatic AudioInfo update is active.
int nextEmptyIndex ()
 Provides you the index of the next empty stream. -1 when none is found.
int nextEmptyIndex ()
 Provides you the index of the next empty stream. -1 when none is found.
virtual operator bool ()
virtual operator bool ()
Stream * operator[] (int idx)
 Provides the stream pointer at the indicated index.
Stream * operator[] (int idx)
 Provides the stream pointer at the indicated index.
size_t readBytes (uint8_t *data, size_t len) override
 Provides the data from all streams mixed together.
size_t readBytes (uint8_t *data, size_t len) override
 Provides the data from all streams mixed together.
virtual size_t readSilence (uint8_t *buffer, size_t length)
 Source to generate silence: just sets the buffer to 0.
virtual size_t readSilence (uint8_t *buffer, size_t length)
 Source to generate silence: just sets the buffer to 0.
bool remove ()
 Removes all streams which have no data available.
bool remove ()
 Removes all streams which have no data available.
bool remove (int idx)
 Removes a stream by index position.
bool remove (int idx)
 Removes a stream by index position.
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.
bool set (int index, Stream &in)
 Replaces a stream at the indicated index.
bool set (int index, Stream &in)
 Replaces a stream at the indicated index.
virtual void setAudioInfo (AudioInfo newInfo) override
 Defines the input AudioInfo.
virtual void setAudioInfo (AudioInfo newInfo) override
 Defines the input AudioInfo.
void setLimitToAvailableData (bool flag)
void setLimitToAvailableData (bool flag)
void setNotifyActive (bool flag)
 Deactivate/Reactivate automatic AudioInfo updates: (default is active).
void setNotifyActive (bool flag)
 Deactivate/Reactivate automatic AudioInfo updates: (default is active).
void setRetryCount (int retry)
void setRetryCount (int retry)
void setWeight (int index, int weight)
void setWeight (int index, int weight)
void setWriteBufferSize (int size)
void setWriteBufferSize (int size)
int size ()
 Number of stremams to which are mixed together.
int size ()
 Number of stremams to which are mixed together.
virtual size_t write (const uint8_t *data, size_t len) override
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).
virtual void writeSilence (size_t len)
 Writes len bytes of silence (=0).

Protected Member Functions

int availableBytes ()
 Provides the available bytes from the first stream with data.
int availableBytes ()
 Provides the available bytes from the first stream with data.
virtual int not_supported (int out, const char *msg="")
virtual int not_supported (int out, const char *msg="")
void notifyAudioChange (AudioInfo info)
void notifyAudioChange (AudioInfo info)
int readBytesVector (T *p_data, int byteCount)
 mixing using a vector of samples
int readBytesVector (T *p_data, int byteCount)
 mixing using a vector of samples
void recalculateWeights ()
 Recalculate the weights.
void recalculateWeights ()
 Recalculate the weights.
void refillReadBuffer ()
 Refill small read buffer (e.g. 8 bytes) to avoid single byte reads when calling read().
void refillReadBuffer ()
 Refill small read buffer (e.g. 8 bytes) to avoid single byte reads when calling read().
void resultAdd (MixGain< T > factor, int samples_eff)
void resultAdd (MixGain< T > factor, int samples_eff)
void resultClear (int samples)
void resultClear (int samples)

Protected Attributes

int _timeout = 10
Vector< T > current_vect
int frame_size = 4
Vector< float > gains {0}
AudioInfo info
bool is_notify_active = true
bool limit_available_data = false
Vector< AudioInfoSupport * > notify_vector
Vector< SumT > result_vect
int retry_count = 5
Vector< Stream * > streams {0}
RingBuffer< uint8_t > tmp_in {0}
RingBuffer< uint8_t > tmp_out {0}
int total_weights = 0
Vector< int > weights {0}
int write_buffer_size = 8

Detailed Description

template<typename T = int16_t, typename SumT = float>
class audio_tools::audio_tools::InputMixer< T, SumT >

MixerStream is mixing the input from Multiple Input Streams. All streams must have the same audo format (sample rate, channels, bits per sample).

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ InputMixer() [1/2]

template<typename T = int16_t, typename SumT = float>
InputMixer ( )
default

◆ InputMixer() [2/2]

template<typename T = int16_t, typename SumT = float>
InputMixer ( )
default

Member Function Documentation

◆ add() [1/2]

template<typename T = int16_t, typename SumT = float>
int add ( Stream & in,
int weight = 100 )
inline

Adds a new input stream and returns it's actual index position.

◆ add() [2/2]

template<typename T = int16_t, typename SumT = float>
int add ( Stream & in,
int weight = 100 )
inline

Adds a new input stream and returns it's actual index position.

◆ addNotifyAudioChange() [1/2]

virtual void addNotifyAudioChange ( AudioInfoSupport & bi)
inlinevirtualinherited

Adds target to be notified about audio changes.

Reimplemented in CodecNOP, CodecNOP, EncodedAudioOutput, and EncodedAudioStream.

◆ addNotifyAudioChange() [2/2]

virtual void addNotifyAudioChange ( AudioInfoSupport & bi)
inlinevirtualinherited

Adds target to be notified about audio changes.

Reimplemented in CodecNOP, CodecNOP, EncodedAudioOutput, and EncodedAudioStream.

◆ audioInfo() [1/2]

◆ audioInfo() [2/2]

◆ audioInfoOut() [1/2]

◆ audioInfoOut() [2/2]

◆ available() [1/2]

template<typename T = int16_t, typename SumT = float>
int available ( )
inlineoverridevirtual

Reports 0 when no streams are mixed in, otherwise the combined available bytes (bounded by the least-available stream when limit_available_data is set)

Reimplemented from BaseStream.

◆ available() [2/2]

template<typename T = int16_t, typename SumT = float>
int available ( )
inlineoverridevirtual

Reports 0 when no streams are mixed in, otherwise the combined available bytes (bounded by the least-available stream when limit_available_data is set)

Reimplemented from BaseStream.

◆ availableBytes() [1/2]

template<typename T = int16_t, typename SumT = float>
int availableBytes ( )
inlineprotected

Provides the available bytes from the first stream with data.

◆ availableBytes() [2/2]

template<typename T = int16_t, typename SumT = float>
int availableBytes ( )
inlineprotected

Provides the available bytes from the first stream with data.

◆ availableForWrite() [1/2]

virtual int availableForWrite ( )
inlineoverridevirtualinherited

Reimplemented from Print.

Reimplemented in A2DPStream, AbstractURLStream, AnalogAudioStream, AudioStreamWrapper, AudioStreamWrapper, ConverterStream< T >, ConverterStream< T >, DynamicMemoryStream, DynamicMemoryStream, EncodedAudioStream, FilteredStream< T, TF >, FilteredStream< T, TF >, FilteredStream< int16_t, int16_t >, MemoryStream, MemoryStream, ProgressStream, ProgressStream, QueueStream< T >, QueueStream< T >, QueueStream< uint8_t >, ReformatBaseStream, RingBufferStream, RingBufferStream, Throttle, Throttle, TimedStream, AudioBLEClient, AudioBLEClient, AudioBLEServer, AudioBLEServer, AudioEffectStream, AudioEffectStreamT< T >, AudioFFTBase, AudioLoRa, AudioStreamWrapper, AutomaticGainControlStream, ChannelFormatConverterStream, ChannelFormatConverterStreamT< T >, ConverterStream< T >, DynamicMemoryStream, EncodedAudioStream, Equalizer3BandsPerChannelT< T >, Equalizer3BandsPerChannelT< float >, Equalizer3BandsT< T >, Equalizer3BandsT< float >, ESPNowStream, FadeStream, FaustStream< DSP >, FilteredStream< T, TF >, FrequencyDetectorAutoCorrelation, FrequencyDetectorZeroCrossing, HammingFEC< bytecount, block_t >, I2SCodecStream, I2SStream, MeasuringStream, MemoryStream, MiniAudioStream, NRF24Stream, NumberFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, Pipeline, ProgressStream, QualityAnalysisStream, QueueStream< T >, ReedSolomonFEC< bytecount, additional_bytes >, ReformatBaseStream, RingBufferStream, SPIAudioSlave, StdioStream, SupportedRatesStream, Throttle, TimedStream, UDPStream, URLStreamESP32, USBAudioStreamBase, VBANStream, and VolumeStream.

◆ availableForWrite() [2/2]

virtual int availableForWrite ( )
inlineoverridevirtualinherited

Reimplemented from Print.

Reimplemented in A2DPStream, AbstractURLStream, AnalogAudioStream, AudioStreamWrapper, AudioStreamWrapper, ConverterStream< T >, ConverterStream< T >, DynamicMemoryStream, DynamicMemoryStream, EncodedAudioStream, FilteredStream< T, TF >, FilteredStream< T, TF >, FilteredStream< int16_t, int16_t >, MemoryStream, MemoryStream, ProgressStream, ProgressStream, QueueStream< T >, QueueStream< T >, QueueStream< uint8_t >, ReformatBaseStream, RingBufferStream, RingBufferStream, Throttle, Throttle, TimedStream, AudioBLEClient, AudioBLEClient, AudioBLEServer, AudioBLEServer, AudioEffectStream, AudioEffectStreamT< T >, AudioFFTBase, AudioLoRa, AudioStreamWrapper, AutomaticGainControlStream, ChannelFormatConverterStream, ChannelFormatConverterStreamT< T >, ConverterStream< T >, DynamicMemoryStream, EncodedAudioStream, Equalizer3BandsPerChannelT< T >, Equalizer3BandsPerChannelT< float >, Equalizer3BandsT< T >, Equalizer3BandsT< float >, ESPNowStream, FadeStream, FaustStream< DSP >, FilteredStream< T, TF >, FrequencyDetectorAutoCorrelation, FrequencyDetectorZeroCrossing, HammingFEC< bytecount, block_t >, I2SCodecStream, I2SStream, MeasuringStream, MemoryStream, MiniAudioStream, NRF24Stream, NumberFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, Pipeline, ProgressStream, QualityAnalysisStream, QueueStream< T >, ReedSolomonFEC< bytecount, additional_bytes >, ReformatBaseStream, RingBufferStream, SPIAudioSlave, StdioStream, SupportedRatesStream, Throttle, TimedStream, UDPStream, URLStreamESP32, USBAudioStreamBase, VBANStream, and VolumeStream.

◆ begin() [1/3]

virtual bool begin ( )
inlinevirtualinherited

Reimplemented in AdapterAudioOutputToAudioStream, AdaptiveResamplingStream, AnalogAudioStream, AdapterAudioOutputToAudioStream, AudioInputMonitor, AudioInputMonitor, AudioStreamWrapper, AudioStreamWrapper, AudioTimeSourceStream, CallbackStream, CallbackStream, CatStream, CatStream, DynamicMemoryStream, DynamicMemoryStream, EncodedAudioStream, FilteredStream< T, TF >, FilteredStream< T, TF >, GeneratedSoundStream< T >, GeneratedSoundStream< T >, GeneratedSoundStream< int16_t >, InputMerge< T >, InputMerge< T >, MemoryStream, MemoryStream, ProgressStream, ProgressStream, QueueStream< T >, QueueStream< T >, QueueStream< uint8_t >, Throttle, Throttle, TimedStream, TimerCallbackAudioStream, TimerCallbackAudioStream, VolumeMeter, VolumeMeter, AudioBoardStream, AudioEffectStream, AudioEffectStreamT< T >, AudioFFTBase, AudioInputMonitor, AudioKitStream, AudioLoRa, AudioMP34DT05, AudioOutputWithCallback, AudioStreamWrapper, AudioTimeSourceStream, AutomaticGainControlStream, CallbackStream, CatStream, ChannelFormatConverterStream, ChannelFormatConverterStreamT< T >, DynamicMemoryStream, EncodedAudioStream, Equalizer3BandsPerChannelT< T >, Equalizer3BandsPerChannelT< float >, Equalizer3BandsT< T >, Equalizer3BandsT< float >, EqualizerNBands< SampleT, AccT, NUM_TAPS, NUM_BANDS >, ESPNowStream, FileLoopT< FileType >, FileLoopT< File >, FilteredStream< T, TF >, FormatConverterStream, FrequencyDetectorAutoCorrelation, GeneratedSoundStream< T >, GoertzelStream, HLSStreamT< URLStream >, HLSStreamT< URLStreamESP32 >, I2SCodecStream, I2SStream, InputMerge< T >, MeasuringStream, MemoryStream, MiniAudioStream, MozziStream, NRF24Stream, NumberFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, Pipeline, Pipeline::ModifyingStreamAdapter, PortAudioStream, ProgressStream, PureDataStream, QualityAnalysisStream, QueueStream< T >, ResampleStream, ResampleStreamT< TInterpolator >, SPDIFOutput, StdioStream, SupportedRatesStream, Throttle, TimedStream, TimerCallbackAudioStream, USBAudioDeviceBase, USBAudioHostBase, VBANStream, VolumeMeter, VolumeStream, VS1053Stream, and WM8960Stream.

◆ begin() [2/3]

template<typename T = int16_t, typename SumT = float>
virtual bool begin ( AudioInfo info)
inlinevirtual

◆ begin() [3/3]

template<typename T = int16_t, typename SumT = float>
virtual bool begin ( AudioInfo info)
inlinevirtual

◆ clearNotifyAudioChange() [1/2]

virtual void clearNotifyAudioChange ( )
inlinevirtualinherited

◆ clearNotifyAudioChange() [2/2]

virtual void clearNotifyAudioChange ( )
inlinevirtualinherited

◆ end() [1/2]

template<typename T = int16_t, typename SumT = float>
void end ( )
inlineoverridevirtual

Remove all input streams.

Reimplemented from BaseStream.

◆ end() [2/2]

template<typename T = int16_t, typename SumT = float>
void end ( )
inlineoverridevirtual

Remove all input streams.

Reimplemented from BaseStream.

◆ flush() [1/2]

◆ flush() [2/2]

◆ indexOf() [1/2]

template<typename T = int16_t, typename SumT = float>
int indexOf ( Stream & stream)
inline

Provides the actual index of the stream.

◆ indexOf() [2/2]

template<typename T = int16_t, typename SumT = float>
int indexOf ( Stream & stream)
inline

Provides the actual index of the stream.

◆ isNotifyActive() [1/2]

bool isNotifyActive ( )
inlineinherited

Checks if the automatic AudioInfo update is active.

◆ isNotifyActive() [2/2]

bool isNotifyActive ( )
inlineinherited

Checks if the automatic AudioInfo update is active.

◆ nextEmptyIndex() [1/2]

template<typename T = int16_t, typename SumT = float>
int nextEmptyIndex ( )
inline

Provides you the index of the next empty stream. -1 when none is found.

◆ nextEmptyIndex() [2/2]

template<typename T = int16_t, typename SumT = float>
int nextEmptyIndex ( )
inline

Provides you the index of the next empty stream. -1 when none is found.

◆ not_supported() [1/2]

virtual int not_supported ( int out,
const char * msg = "" )
inlineprotectedvirtualinherited

◆ not_supported() [2/2]

virtual int not_supported ( int out,
const char * msg = "" )
inlineprotectedvirtualinherited

◆ notifyAudioChange() [1/2]

void notifyAudioChange ( AudioInfo info)
inlineprotectedinherited

◆ notifyAudioChange() [2/2]

void notifyAudioChange ( AudioInfo info)
inlineprotectedinherited

◆ operator bool() [1/2]

◆ operator bool() [2/2]

◆ operator[]() [1/2]

template<typename T = int16_t, typename SumT = float>
Stream * operator[] ( int idx)
inline

Provides the stream pointer at the indicated index.

◆ operator[]() [2/2]

template<typename T = int16_t, typename SumT = float>
Stream * operator[] ( int idx)
inline

Provides the stream pointer at the indicated index.

◆ readBytes() [1/2]

template<typename T = int16_t, typename SumT = float>
size_t readBytes ( uint8_t * data,
size_t len )
inlineoverridevirtual

Provides the data from all streams mixed together.

Reimplemented from AudioStream.

◆ readBytes() [2/2]

template<typename T = int16_t, typename SumT = float>
size_t readBytes ( uint8_t * data,
size_t len )
inlineoverridevirtual

Provides the data from all streams mixed together.

Reimplemented from AudioStream.

◆ readBytesVector() [1/2]

template<typename T = int16_t, typename SumT = float>
int readBytesVector ( T * p_data,
int byteCount )
inlineprotected

mixing using a vector of samples

◆ readBytesVector() [2/2]

template<typename T = int16_t, typename SumT = float>
int readBytesVector ( T * p_data,
int byteCount )
inlineprotected

mixing using a vector of samples

◆ readSilence() [1/2]

virtual size_t readSilence ( uint8_t * buffer,
size_t length )
inlinevirtualinherited

Source to generate silence: just sets the buffer to 0.

◆ readSilence() [2/2]

virtual size_t readSilence ( uint8_t * buffer,
size_t length )
inlinevirtualinherited

Source to generate silence: just sets the buffer to 0.

◆ recalculateWeights() [1/2]

template<typename T = int16_t, typename SumT = float>
void recalculateWeights ( )
inlineprotected

Recalculate the weights.

◆ recalculateWeights() [2/2]

template<typename T = int16_t, typename SumT = float>
void recalculateWeights ( )
inlineprotected

Recalculate the weights.

◆ refillReadBuffer() [1/2]

void refillReadBuffer ( )
inlineprotectedinherited

Refill small read buffer (e.g. 8 bytes) to avoid single byte reads when calling read().

◆ refillReadBuffer() [2/2]

void refillReadBuffer ( )
inlineprotectedinherited

Refill small read buffer (e.g. 8 bytes) to avoid single byte reads when calling read().

◆ remove() [1/4]

template<typename T = int16_t, typename SumT = float>
bool remove ( )
inline

Removes all streams which have no data available.

◆ remove() [2/4]

template<typename T = int16_t, typename SumT = float>
bool remove ( )
inline

Removes all streams which have no data available.

◆ remove() [3/4]

template<typename T = int16_t, typename SumT = float>
bool remove ( int idx)
inline

Removes a stream by index position.

◆ remove() [4/4]

template<typename T = int16_t, typename SumT = float>
bool remove ( int idx)
inline

Removes a stream by index position.

◆ removeNotifyAudioChange() [1/2]

virtual bool removeNotifyAudioChange ( AudioInfoSupport & bi)
inlinevirtualinherited

Removes a target in order not to be notified about audio changes.

◆ removeNotifyAudioChange() [2/2]

virtual bool removeNotifyAudioChange ( AudioInfoSupport & bi)
inlinevirtualinherited

Removes a target in order not to be notified about audio changes.

◆ resultAdd() [1/2]

template<typename T = int16_t, typename SumT = float>
void resultAdd ( MixGain< T > factor,
int samples_eff )
inlineprotected

◆ resultAdd() [2/2]

template<typename T = int16_t, typename SumT = float>
void resultAdd ( MixGain< T > factor,
int samples_eff )
inlineprotected

◆ resultClear() [1/2]

template<typename T = int16_t, typename SumT = float>
void resultClear ( int samples)
inlineprotected

◆ resultClear() [2/2]

template<typename T = int16_t, typename SumT = float>
void resultClear ( int samples)
inlineprotected

◆ set() [1/2]

template<typename T = int16_t, typename SumT = float>
bool set ( int index,
Stream & in )
inline

Replaces a stream at the indicated index.

◆ set() [2/2]

template<typename T = int16_t, typename SumT = float>
bool set ( int index,
Stream & in )
inline

Replaces a stream at the indicated index.

◆ setAudioInfo() [1/2]

◆ setAudioInfo() [2/2]

◆ setLimitToAvailableData() [1/2]

template<typename T = int16_t, typename SumT = float>
void setLimitToAvailableData ( bool flag)
inline

Limit the copy to the available data of all streams: stops to provide data when any stream has ended

◆ setLimitToAvailableData() [2/2]

template<typename T = int16_t, typename SumT = float>
void setLimitToAvailableData ( bool flag)
inline

Limit the copy to the available data of all streams: stops to provide data when any stream has ended

◆ setNotifyActive() [1/2]

void setNotifyActive ( bool flag)
inlineinherited

Deactivate/Reactivate automatic AudioInfo updates: (default is active).

◆ setNotifyActive() [2/2]

void setNotifyActive ( bool flag)
inlineinherited

Deactivate/Reactivate automatic AudioInfo updates: (default is active).

◆ setRetryCount() [1/2]

template<typename T = int16_t, typename SumT = float>
void setRetryCount ( int retry)
inline

Defines the maximum number of retrys to get data from an input before we abort the read and provide empty data

◆ setRetryCount() [2/2]

template<typename T = int16_t, typename SumT = float>
void setRetryCount ( int retry)
inline

Defines the maximum number of retrys to get data from an input before we abort the read and provide empty data

◆ setWeight() [1/2]

template<typename T = int16_t, typename SumT = float>
void setWeight ( int index,
int weight )
inline

Dynamically update the new weight for the indicated channel: If you set it to 0 it is muted (and the stream is not read any more). We recommend to use values between 1 and 100

◆ setWeight() [2/2]

template<typename T = int16_t, typename SumT = float>
void setWeight ( int index,
int weight )
inline

Dynamically update the new weight for the indicated channel: If you set it to 0 it is muted (and the stream is not read any more). We recommend to use values between 1 and 100

◆ setWriteBufferSize() [1/2]

void setWriteBufferSize ( int size)
inlineinherited

◆ setWriteBufferSize() [2/2]

void setWriteBufferSize ( int size)
inlineinherited

◆ size() [1/2]

template<typename T = int16_t, typename SumT = float>
int size ( )
inline

Number of stremams to which are mixed together.

◆ size() [2/2]

template<typename T = int16_t, typename SumT = float>
int size ( )
inline

Number of stremams to which are mixed together.

◆ write() [1/3]

virtual size_t write ( const uint8_t * data,
size_t len )
inlineoverridevirtualinherited

Implements BaseStream.

Reimplemented in A2DPStream, AdapterAudioOutputToAudioStream, AdaptiveResamplingStream, AnalogAudioStream, AnalogDriverESP32V1::IO16Bit, AnalogDriverESP32V2::IO16Bit, AdapterAudioOutputToAudioStream, AudioInputMonitor, AudioInputMonitor, AudioStreamWrapper, AudioStreamWrapper, AudioTimeSourceStream, BufferedStream, BufferedStream, CallbackStream, CallbackStream, ConverterStream< T >, ConverterStream< T >, EncodedAudioStream, FilteredStream< T, TF >, FilteredStream< T, TF >, FilteredStream< int16_t, int16_t >, MemoryStream, MemoryStream, ProgressStream, ProgressStream, RingBufferStream, RingBufferStream, Throttle, Throttle, TimedStream, VolumeMeter, VolumeMeter, AudioBLEClient, AudioBLEClient, AudioBLEServer, AudioBLEServer, AudioEffectStream, AudioEffectStreamT< T >, AudioFFTBase, AudioInputMonitor, AudioKitStream, AudioLoRa, AudioStreamWrapper, AudioTimeSourceStream, AutomaticGainControlStream, BufferedStream, BufferedTaskStream, CallbackStream, ChannelFormatConverterStream, ChannelFormatConverterStreamT< T >, ConverterStream< T >, EncodedAudioStream, Equalizer3BandsPerChannelT< T >, Equalizer3BandsPerChannelT< float >, Equalizer3BandsT< T >, Equalizer3BandsT< float >, EqualizerNBands< SampleT, AccT, NUM_TAPS, NUM_BANDS >, ESP3288AudioOutput, FadeStream, FaustStream< DSP >, FilteredStream< T, TF >, FormatConverterStream, FrequencyDetectorAutoCorrelation, FrequencyDetectorZeroCrossing, GoertzelStream, I2SCodecStream, I2SStream, LMSEchoCancellationStream< T >, MDFEchoCancellationStream< T, SampleType >, MeasuringStream, MemoryStream, MiniAudioStream, MozziStream, NRF24Stream, NumberFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, Pipeline::ModifyingStreamAdapter, Pipeline, PortAudioStream, ProgressStream, PureDataStream, QualityAnalysisStream, ResampleStream, ResampleStreamT< TInterpolator >, RingBufferStream, SPDIFOutput, SPIAudioSlave, SupportedRatesStream, TfLiteAudioStream, TfLiteAudioStreamBase, Throttle, TimedStream, URLStream, URLStreamESP32, USBAudioStreamBase, VBANStream, VolumeMeter, VolumeStream, VS1053Stream, and WM8960Stream.

◆ write() [2/3]

virtual size_t write ( const uint8_t * data,
size_t len )
inlineoverridevirtualinherited

Implements BaseStream.

Reimplemented in A2DPStream, AdapterAudioOutputToAudioStream, AdaptiveResamplingStream, AnalogAudioStream, AnalogDriverESP32V1::IO16Bit, AnalogDriverESP32V2::IO16Bit, AdapterAudioOutputToAudioStream, AudioInputMonitor, AudioInputMonitor, AudioStreamWrapper, AudioStreamWrapper, AudioTimeSourceStream, BufferedStream, BufferedStream, CallbackStream, CallbackStream, ConverterStream< T >, ConverterStream< T >, EncodedAudioStream, FilteredStream< T, TF >, FilteredStream< T, TF >, FilteredStream< int16_t, int16_t >, MemoryStream, MemoryStream, ProgressStream, ProgressStream, RingBufferStream, RingBufferStream, Throttle, Throttle, TimedStream, VolumeMeter, VolumeMeter, AudioBLEClient, AudioBLEClient, AudioBLEServer, AudioBLEServer, AudioEffectStream, AudioEffectStreamT< T >, AudioFFTBase, AudioInputMonitor, AudioKitStream, AudioLoRa, AudioStreamWrapper, AudioTimeSourceStream, AutomaticGainControlStream, BufferedStream, BufferedTaskStream, CallbackStream, ChannelFormatConverterStream, ChannelFormatConverterStreamT< T >, ConverterStream< T >, EncodedAudioStream, Equalizer3BandsPerChannelT< T >, Equalizer3BandsPerChannelT< float >, Equalizer3BandsT< T >, Equalizer3BandsT< float >, EqualizerNBands< SampleT, AccT, NUM_TAPS, NUM_BANDS >, ESP3288AudioOutput, FadeStream, FaustStream< DSP >, FilteredStream< T, TF >, FormatConverterStream, FrequencyDetectorAutoCorrelation, FrequencyDetectorZeroCrossing, GoertzelStream, I2SCodecStream, I2SStream, LMSEchoCancellationStream< T >, MDFEchoCancellationStream< T, SampleType >, MeasuringStream, MemoryStream, MiniAudioStream, MozziStream, NRF24Stream, NumberFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, Pipeline::ModifyingStreamAdapter, Pipeline, PortAudioStream, ProgressStream, PureDataStream, QualityAnalysisStream, ResampleStream, ResampleStreamT< TInterpolator >, RingBufferStream, SPDIFOutput, SPIAudioSlave, SupportedRatesStream, TfLiteAudioStream, TfLiteAudioStreamBase, Throttle, TimedStream, URLStream, URLStreamESP32, USBAudioStreamBase, VBANStream, VolumeMeter, VolumeStream, VS1053Stream, and WM8960Stream.

◆ write() [3/3]

◆ writeSilence() [1/2]

virtual void writeSilence ( size_t len)
inlinevirtualinherited

Writes len bytes of silence (=0).

◆ writeSilence() [2/2]

virtual void writeSilence ( size_t len)
inlinevirtualinherited

Writes len bytes of silence (=0).

Member Data Documentation

◆ _timeout

int _timeout = 10
protectedinherited

◆ current_vect

template<typename T = int16_t, typename SumT = float>
Vector< T > current_vect
protected

◆ frame_size

template<typename T = int16_t, typename SumT = float>
int frame_size = 4
protected

◆ gains

template<typename T = int16_t, typename SumT = float>
Vector< float > gains {0}
protected

◆ info

AudioInfo info
protectedinherited

◆ is_notify_active

bool is_notify_active = true
protectedinherited

◆ limit_available_data

template<typename T = int16_t, typename SumT = float>
bool limit_available_data = false
protected

◆ notify_vector

Vector< AudioInfoSupport * > notify_vector
protectedinherited

◆ result_vect

template<typename T = int16_t, typename SumT = float>
Vector< SumT > result_vect
protected

◆ retry_count

template<typename T = int16_t, typename SumT = float>
int retry_count = 5
protected

◆ streams

template<typename T = int16_t, typename SumT = float>
Vector< Stream * > streams {0}
protected

◆ tmp_in

RingBuffer< uint8_t > tmp_in {0}
protectedinherited

◆ tmp_out

RingBuffer< uint8_t > tmp_out {0}
protectedinherited

◆ total_weights

template<typename T = int16_t, typename SumT = float>
int total_weights = 0
protected

◆ weights

template<typename T = int16_t, typename SumT = float>
Vector< int > weights {0}
protected

◆ write_buffer_size

int write_buffer_size = 8
protectedinherited

The documentation for this class was generated from the following files: