arduino-audio-tools
|
VS1053 Output Interface which processes PCM data by default. If you want to write encoded data set is_encoded_data = true in the configuration;. More...
#include <VS1053Stream.h>
Public Member Functions | |
virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
Adds target to be notified about audio changes. | |
virtual AudioInfo | audioInfo () override |
provides the actual input AudioInfo | |
virtual AudioInfo | audioInfoOut () |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream | |
virtual int | available () override |
virtual int | availableForWrite () override |
float | balance () |
Get the currenet balance setting (-1.0..1.0) | |
bool | begin () |
Starts with the default config or restarts. | |
bool | begin (VS1053Config cfg) |
Starts with the indicated configuration. | |
virtual void | clearNotifyAudioChange () |
Deletes all change notify subscriptions. | |
VS1053Config | defaultConfig (RxTxMode mode=TX_MODE) |
void | end () |
Stops the processing and releases the memory. | |
virtual void | flush () override |
VS1053 & | getVS1053 () |
returns the VS1053 object | |
bool | isNotifyActive () |
Checks if the automatic AudioInfo update is active. | |
virtual | operator bool () |
virtual 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 | setAudioInfo (AudioInfo c) |
Defines the input AudioInfo. | |
void | setAudioInfo (VS1053Config c) |
defines the default configuration that is used with the next begin() | |
void | setBalance (float bal) |
Adjusting the left and right volume balance, higher to enhance the right side, lower to enhance the left side. | |
bool | setEncoder (AudioEncoder *enc) |
Defines an alternative encoder that will be used (e.g. MP3Encoder). It must be allocated on the heap! | |
void | setNotifyActive (bool flag) |
Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
bool | setVolume (float vol) override |
value from 0 to 1.0 | |
float | volume () override |
provides the volume | |
virtual size_t | write (const uint8_t *data, size_t len) override |
Write audio data. | |
virtual size_t | write (uint8_t ch) override |
virtual void | writeSilence (size_t len) |
Writes len bytes of silence (=0). | |
Protected Member Functions | |
bool | beginTx () |
void | logError (const char *str) |
virtual int | not_supported (int out, const char *msg="") |
void | notifyAudioChange (AudioInfo info) |
void | refillReadBuffer () |
Protected Attributes | |
int | _timeout = 10 |
VS1053Config | cfg |
CopyEncoder | copy |
AudioInfo | info |
bool | is_notify_active = true |
Vector< AudioInfoSupport * > | notify_vector |
AudioEncoder * | p_encoder = new WAVEncoder() |
EncodedAudioStream * | p_out = nullptr |
VS1053 * | p_vs1053 = nullptr |
VS1053StreamOut * | p_vs1053_out = nullptr |
RingBuffer< uint8_t > | tmp_in {0} |
RingBuffer< uint8_t > | tmp_out {0} |
float | volume_value = 1.0f |
VS1053 Output Interface which processes PCM data by default. If you want to write encoded data set is_encoded_data = true in the configuration;.
|
inlinevirtualinherited |
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, MP3DecoderMAD, EncodedAudioOutput, EncodedAudioStream, AACDecoderFDK, DecoderBasic, MP3DecoderHelix, OggContainerDecoder, Pipeline, and Pipeline::ModifyingStreamAdapter.
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in JupyterAudioT< T >, MozziStream, TimerCallbackAudioStream, PureDataStream, AdapterAudioOutputToAudioStream, GeneratedSoundStream< T >, and GeneratedSoundStream< int16_t >.
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in PureDataStream, PWMAudioOutput, ChannelFormatConverterStreamT< T >, ChannelFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, NumberFormatConverterStream, FormatConverterStream, Pipeline, and ResampleStream.
Reimplemented from Stream.
Reimplemented in AudioKitStream, A2DPStream, I2SCodecStream, TfLiteAudioStream, UDPStream, ICYStream, BufferedTaskStream, I2SStream, TimedStream, GeneratedSoundStream< T >, GeneratedSoundStream< int16_t >, BufferedStream, ConverterStream< T >, InputMerge< T >, Pipeline::ModifyingStreamAdapter, and VolumeStream.
Reimplemented from Print.
Reimplemented in UDPStream, A2DPStream, I2SCodecStream, AbstractURLStream, I2SStream, MeasuringStream, ProgressStream, and VolumeStream.
|
inlinevirtual |
Starts with the default config or restarts.
Reimplemented from BaseStream.
|
inlinevirtual |
Stops the processing and releases the memory.
Reimplemented from BaseStream.
Reimplemented from Print.
Reimplemented in ResampleStream, ICYStreamBuffered, BufferedTaskStream, and BufferedStream.
Reimplemented in A2DPStream, Pipeline, I2SStream, and MemoryStream.
Implements BaseStream.
Reimplemented in MozziStream, A2DPStream, FaustStream< DSP >, AudioKitStream, I2SCodecStream, TfLiteAudioStream, AnalogAudioArduino, AudioEffectStreamT< T >, Equilizer3Bands, ICYStream, BufferedTaskStream, I2SStream, TimedStream, GeneratedSoundStream< T >, GeneratedSoundStream< int16_t >, BufferedStream, MeasuringStream, ProgressStream, InputMixer< T >, InputMerge< T >, VolumeStream, and AnalogDriverESP32V1::IO16Bit.
Defines the input AudioInfo.
Reimplemented from AudioStream.
value from 0 to 1.0
Reimplemented from VolumeSupport.
|
inlineoverridevirtual |
provides the volume
Reimplemented from VolumeSupport.
Write audio data.
Reimplemented from AudioStream.
Reimplemented in BufferedTaskStream, and BufferedStream.