|
arduino-audio-tools
|
Provides data from a concatenation of Streams. Please note that the provided Streams can be played only once! You will need to reset them (e.g. moving the file pointer to the beginning) and read them back if you want to process them a second time. The default timeout on the available() method is set to 0. This might be too small if you use e.g. a URLStream. If you set beginReset to true in the constructor, the system will automatically reset the streams when begin() is called. More...
#include <CodecOpusOgg.h>
Public Member Functions | |
| CatStream (bool beginReset=false) | |
| CatStream (bool beginReset=false) | |
| void | add (Stream &stream) |
| void | add (Stream &stream) |
| void | add (Stream *stream) |
| void | add (Stream *stream) |
| int | available () override |
| int | available () override |
| virtual int | availableForWrite () override |
| virtual int | availableForWrite () override |
| bool | begin () override |
| bool | begin () override |
| void | clear () |
| clear | |
| void | clear () |
| clear | |
| void | end () override |
| void | end () override |
| virtual void | flush () override |
| virtual void | flush () override |
| operator bool () | |
| Returns true if active and we still have data. | |
| operator bool () | |
| Returns true if active and we still have data. | |
| size_t | readBytes (uint8_t *data, size_t len) override |
| size_t | readBytes (uint8_t *data, size_t len) override |
| void | setAvailableCallback (int(*callback)(Stream *stream)) |
| Defines the callback used to determine available bytes for a stream. | |
| void | setAvailableCallback (int(*callback)(Stream *stream)) |
| Defines the callback used to determine available bytes for a stream. | |
| void | setOnBeginCallback (void(*callback)(Stream *stream)) |
| Defines the callback which is called when a new stream is started. | |
| void | setOnBeginCallback (void(*callback)(Stream *stream)) |
| Defines the callback which is called when a new stream is started. | |
| void | setOnEndCallback (void(*callback)(Stream *stream)) |
| Defines the callback which is called when a stream is finished. | |
| void | setOnEndCallback (void(*callback)(Stream *stream)) |
| Defines the callback which is called when a stream is finished. | |
| void | setTimeout (size_t t) |
| Defines the timout in ms the system waits for data when moving to the next stream. | |
| void | setTimeout (size_t t) |
| Defines the timout in ms the system waits for data when moving to the next stream. | |
| void | setWriteBufferSize (int size) |
| void | setWriteBufferSize (int size) |
| virtual size_t | write (uint8_t ch) override |
| size_t | write (const uint8_t *data, size_t size) override |
| not supported | |
| size_t | write (const uint8_t *data, size_t size) override |
| not supported | |
Protected Member Functions | |
| int | availableWithTimeout () |
| int | availableWithTimeout () |
| bool | moveToNextStreamOnEnd (bool force_next_stream=false) |
| bool | moveToNextStreamOnEnd (bool force_next_stream=false) |
| 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(). | |
| int | streamAvailable (Stream *stream) |
| int | streamAvailable (Stream *stream) |
Protected Attributes | |
| int | _timeout = 10 |
| Vector< Stream * > | all_streams |
| int(* | available_callback )(Stream *stream) = nullptr |
| void(* | begin_callback )(Stream *stream) = nullptr |
| bool | begin_reset = false |
| void(* | end_callback )(Stream *stream) = nullptr |
| Vector< Stream * > | input_streams |
| bool | is_active = false |
| Stream * | p_current_stream = nullptr |
| RingBuffer< uint8_t > | tmp_in {0} |
| RingBuffer< uint8_t > | tmp_out {0} |
| int | write_buffer_size = 8 |
Provides data from a concatenation of Streams. Please note that the provided Streams can be played only once! You will need to reset them (e.g. moving the file pointer to the beginning) and read them back if you want to process them a second time. The default timeout on the available() method is set to 0. This might be too small if you use e.g. a URLStream. If you set beginReset to true in the constructor, the system will automatically reset the streams when begin() is called.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Reimplemented from BaseStream.
|
inlineoverridevirtual |
Reimplemented from BaseStream.
|
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.
|
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.
|
inlineprotected |
|
inlineprotected |
|
inlineoverridevirtual |
Reimplemented from BaseStream.
|
inlineoverridevirtual |
Reimplemented from BaseStream.
|
inline |
clear
|
inline |
clear
|
inlineoverridevirtual |
Reimplemented from BaseStream.
|
inlineoverridevirtual |
Reimplemented from BaseStream.
|
inlineoverridevirtualinherited |
Reimplemented from Print.
Reimplemented in AudioStreamWrapper, AudioStreamWrapper, BufferedStream, BufferedStream, EncodedAudioStream, FilteredStream< T, TF >, FilteredStream< T, TF >, FilteredStream< int16_t, int16_t >, GeneratedSoundStream< T >, GeneratedSoundStream< T >, GeneratedSoundStream< int16_t >, MemoryStream, MemoryStream, QueueStream< T >, QueueStream< T >, QueueStream< uint8_t >, ReformatBaseStream, RingBufferStream, RingBufferStream, TimedStream, AudioEffectStream, AudioEffectStreamT< T >, AudioStreamWrapper, AutomaticGainControlStream, BufferedStream, BufferedTaskStream, EncodedAudioStream, Equalizer3BandsPerChannelT< T >, Equalizer3BandsPerChannelT< float >, Equalizer3BandsT< T >, Equalizer3BandsT< float >, EqualizerNBands< SampleT, AccT, NUM_TAPS, NUM_BANDS >, FadeStream, FilteredStream< T, TF >, GeneratedSoundStream< T >, I2SStream, MeasuringStream, MemoryStream, Pipeline::ModifyingStreamAdapter, PureDataStream, QualityAnalysisStream, QueueStream< T >, ReformatBaseStream, ResampleStream, RingBufferStream, SupportedRatesStream, TimedStream, URLStream, URLStreamBufferedT< T >, URLStreamBufferedT< ICYStream >, URLStreamBufferedT< ICYStreamESP32 >, URLStreamBufferedT< URLStream >, URLStreamBufferedT< URLStreamESP32 >, and VolumeStream.
|
inlineoverridevirtualinherited |
Reimplemented from Print.
Reimplemented in AudioStreamWrapper, AudioStreamWrapper, BufferedStream, BufferedStream, EncodedAudioStream, FilteredStream< T, TF >, FilteredStream< T, TF >, FilteredStream< int16_t, int16_t >, GeneratedSoundStream< T >, GeneratedSoundStream< T >, GeneratedSoundStream< int16_t >, MemoryStream, MemoryStream, QueueStream< T >, QueueStream< T >, QueueStream< uint8_t >, ReformatBaseStream, RingBufferStream, RingBufferStream, TimedStream, AudioEffectStream, AudioEffectStreamT< T >, AudioStreamWrapper, AutomaticGainControlStream, BufferedStream, BufferedTaskStream, EncodedAudioStream, Equalizer3BandsPerChannelT< T >, Equalizer3BandsPerChannelT< float >, Equalizer3BandsT< T >, Equalizer3BandsT< float >, EqualizerNBands< SampleT, AccT, NUM_TAPS, NUM_BANDS >, FadeStream, FilteredStream< T, TF >, GeneratedSoundStream< T >, I2SStream, MeasuringStream, MemoryStream, Pipeline::ModifyingStreamAdapter, PureDataStream, QualityAnalysisStream, QueueStream< T >, ReformatBaseStream, ResampleStream, RingBufferStream, SupportedRatesStream, TimedStream, URLStream, URLStreamBufferedT< T >, URLStreamBufferedT< ICYStream >, URLStreamBufferedT< ICYStreamESP32 >, URLStreamBufferedT< URLStream >, URLStreamBufferedT< URLStreamESP32 >, and VolumeStream.
|
inlineprotected |
moves to the next stream if necessary: returns true if we still have a valid stream
|
inlineprotected |
moves to the next stream if necessary: returns true if we still have a valid stream
|
inline |
Returns true if active and we still have data.
|
inline |
Returns true if active and we still have data.
|
inlineoverridevirtual |
Implements BaseStream.
|
inlineoverridevirtual |
Implements BaseStream.
|
inlineprotectedinherited |
Refill small read buffer (e.g. 8 bytes) to avoid single byte reads when calling read().
|
inlineprotectedinherited |
Refill small read buffer (e.g. 8 bytes) to avoid single byte reads when calling read().
|
inline |
Defines the callback used to determine available bytes for a stream.
|
inline |
Defines the callback used to determine available bytes for a stream.
|
inline |
Defines the callback which is called when a new stream is started.
|
inline |
Defines the callback which is called when a new stream is started.
|
inline |
Defines the callback which is called when a stream is finished.
|
inline |
Defines the callback which is called when a stream is finished.
|
inline |
Defines the timout in ms the system waits for data when moving to the next stream.
|
inline |
Defines the timout in ms the system waits for data when moving to the next stream.
|
inlineinherited |
|
inlineinherited |
|
inlineprotected |
|
inlineprotected |
|
inlineoverridevirtualinherited |
|
inlineoverridevirtual |
not supported
Implements BaseStream.
|
inlineoverridevirtual |
not supported
Implements BaseStream.
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |