|
arduino-audio-tools
|
Stream for reading and writing audio data using the WM8960 Codec Chip You need to install https://github.com/pschatzmann/arduino-wm8960. More...
#include <WM8960Stream.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 () |
| virtual int | available () override |
| virtual int | availableForWrite () override |
| bool | begin () |
| Starts with the default config or restarts. | |
| bool | begin (WM8960Config config) |
| Starts with the indicated configuration. | |
| virtual void | clearNotifyAudioChange () |
| Deletes all change notify subscriptions. | |
| WM8960Config | defaultConfig (RxTxMode mode=TX_MODE) |
| void | end () |
| Stops the processing and releases the memory. | |
| virtual void | flush () override |
| bool | isNotifyActive () |
| Checks if the automatic AudioInfo update is active. | |
| virtual | operator bool () |
| size_t | readBytes (uint8_t *data, size_t size) 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 (WM8960Config c) |
| defines the default configuration that is used with the next begin() | |
| void | setNotifyActive (bool flag) |
| Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
| bool | setVolume (float vol) |
| Sets both input and output volume value (from 0 to 1.0) | |
| void | setVolumeIn (float vol) |
| void | setVolumeOut (float vol) |
| void | setWriteBufferSize (int size) |
| float | volumeIn () |
| provides the volume | |
| float | volumeOut () |
| size_t | write (const uint8_t *data, size_t size) 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 | adjustInputVolume (float vol) |
| bool | configure_clocking () |
| bool | init (RxTxMode mode) |
| mtb_wm8960_mode_t | modeMasterSlave (bool microcontroller_is_master) |
| if microcontroller is master then module is slave | |
| virtual int | not_supported (int out, const char *msg="") |
| void | notifyAudioChange (AudioInfo info) |
| void | refillReadBuffer () |
| mtb_wm8960_adc_dac_sample_rate_t | sampleRate (int rate) |
| void | setOutputVolume (float vol) |
| void | volumeError (float vol) |
| mtb_wm8960_word_length_t | wordLength (int bits) |
Protected Attributes | |
| int | _timeout = 10 |
| WM8960Config | cfg |
| I2SStream | i2s |
| AudioInfo | info |
| bool | is_notify_active = true |
| Vector< AudioInfoSupport * > | notify_vector |
| RingBuffer< uint8_t > | tmp_in {0} |
| RingBuffer< uint8_t > | tmp_out {0} |
| float | volume_in |
| float | volume_out |
| int | write_buffer_size = MAX_SINGLE_CHARS |
Stream for reading and writing audio data using the WM8960 Codec Chip You need to install https://github.com/pschatzmann/arduino-wm8960.
|
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 >.
|
inlinevirtualinherited |
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, ResampleStream, and ResampleStreamT< TInterpolator >.
|
inlineoverridevirtualinherited |
Reimplemented from Stream.
Reimplemented in AudioKitStream, AudioFFTBase, I2SCodecStream, TfLiteAudioStream, A2DPStream, HLSStreamT< URLStream >, ICYStreamT< T >, BufferedTaskStream, UDPStream, Equalizer3Bands, Equalizer3BandsPerChannel, I2SStream, TimedStream, GeneratedSoundStream< T >, GeneratedSoundStream< int16_t >, BufferedStream, ConverterStream< T >, InputMerge< T >, FrequencyDetectorAutoCorrelation, FrequencyDetectorZeroCrossing, Pipeline::ModifyingStreamAdapter, and VolumeStream.
|
inlineoverridevirtualinherited |
Reimplemented from Print.
Reimplemented in UDPStream, AudioFFTBase, I2SCodecStream, A2DPStream, AbstractURLStream, URLStreamESP32, Equalizer3Bands, Equalizer3BandsPerChannel, I2SStream, MeasuringStream, ProgressStream, FrequencyDetectorAutoCorrelation, FrequencyDetectorZeroCrossing, and VolumeStream.
|
inlinevirtual |
Starts with the default config or restarts.
Reimplemented from BaseStream.
|
inlinevirtualinherited |
Deletes all change notify subscriptions.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
|
inlinevirtual |
Stops the processing and releases the memory.
Reimplemented from BaseStream.
|
inlineoverridevirtualinherited |
Reimplemented from Print.
Reimplemented in ResampleStream, BufferedTaskStream, and BufferedStream.
|
inlinevirtualinherited |
Reimplemented in A2DPStream, ICYStreamT< T >, I2SStream, MemoryStream, and Pipeline.
|
inlineoverridevirtual |
Reimplemented from AudioStream.
|
inlinevirtualinherited |
Removes a target in order not to be notified about audio changes.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
|
inlinevirtual |
Defines the input AudioInfo.
Reimplemented from AudioStream.
|
inlineoverridevirtual |
Reimplemented from AudioStream.
|
inlineoverridevirtualinherited |
Reimplemented in BufferedTaskStream, and BufferedStream.