|
arduino-audio-tools
|
AudioKit Stream which uses the https://github.com/pschatzmann/arduino-audiokit library. More...
#include <AudioKit.h>
Public Member Functions | |
| AudioKitStream () | |
| void | addAction (int pin, void(*action)(bool, int, void *), AudioActions::ActiveLogic activeLogic, void *ref=nullptr) |
| Defines a new action that is executed when the indicated pin is active. | |
| void | addAction (int pin, void(*action)(bool, int, void *), void *ref=nullptr) |
| Defines a new action that is executed when the indicated pin is active. | |
| virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
| Adds target to be notified about audio changes. | |
| AudioActions & | audioActions () |
| Provides access to the AudioActions. | |
| virtual AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| int | available () |
| We get the data via I2S - we expect to fill one buffer size. | |
| virtual int | availableForWrite () override |
| bool | begin () override |
| bool | begin (AudioKitStreamConfig config) |
| Starts the processing. | |
| virtual void | clearNotifyAudioChange () |
| Deletes all change notify subscriptions. | |
| AudioKitStreamConfig & | config () |
| AudioKitStreamConfig | defaultConfig (RxTxMode mode=RXTX_MODE) |
| Provides the default configuration. | |
| void | end () override |
| Stops the processing. | |
| virtual void | flush () override |
| bool | headphoneStatus () |
| Returns true if the headphone was detected. | |
| void | incrementVolume (int vol) |
| Relative volume control. | |
| bool | isNotifyActive () |
| Checks if the automatic AudioInfo update is active. | |
| virtual | operator bool () |
| int8_t | pinAdcDetect () |
| Get the gpio number for adc detection. | |
| int8_t | pinAuxin () |
| Get the gpio number for auxin detection. | |
| int8_t | pinBlueLed () |
| Get green led gpio number. | |
| int8_t | pinEs7243Mclk () |
| Get the mclk gpio number of es7243. | |
| int8_t | pinGreenLed () |
| Get DSP reset gpio number. | |
| int8_t | pinHeadphoneDetect () |
| Get the gpio number for headphone detection. | |
| int8_t | pinInputMode () |
| Get the number for mode-button. | |
| int8_t | pinInputPlay () |
| Get number for play function. | |
| int8_t | pinInputRec () |
| Get the record-button id for adc-button. | |
| int8_t | pinInputSet () |
| Get number for set function. | |
| int8_t | pinPaEnable () |
| Get the gpio number for PA enable. | |
| int8_t | pinResetBoard () |
| Get DSP reset gpio number. | |
| int8_t | pinResetCodec () |
| Get green led gpio number. | |
| int8_t | pinVolumeDown () |
| Get number for volume down function. | |
| int8_t | pinVolumeUp () |
| number for volume up function | |
| void | processActions () |
| Process input keys and pins. | |
| size_t | readBytes (uint8_t *data, size_t len) override |
| Reads the audio data. | |
| 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. | |
| bool | setActive (bool active) |
| Sets the codec active / inactive. | |
| void | setAudioInfo (AudioInfo info) override |
| bool | setMute (bool mute) |
| Mutes the output. | |
| void | setNotifyActive (bool flag) |
| Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
| void | setSpeakerActive (bool active) |
| bool | setVolume (double vol) |
| Defines the Volume: Range 0 to 1.0. | |
| bool | setVolume (float vol) |
| Defines the Volume: Range 0 to 1.0. | |
| bool | setVolume (int vol) |
| Defines the Volume: Range 0 to 100. | |
| void | setWriteBufferSize (int size) |
| int | volume () |
| Determines the volume. | |
| 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). | |
Static Public Member Functions | |
| static void | actionHeadphoneDetection (bool, int, void *) |
| Switch off the PA if the headphone in plugged in and switch it on again if the headphone is unplugged. This method complies with the. | |
| static void | actionStart (bool, int, void *) |
| Start. | |
| static void | actionStartStop (bool, int, void *) |
| Toggle start stop. | |
| static void | actionStop (bool, int, void *) |
| Stop. | |
| static void | actionVolumeDown (bool, int, void *) |
| Decrease the volume. | |
| static void | actionVolumeUp (bool, int, void *) |
| Increase the volume. | |
Protected Member Functions | |
| AudioActions::ActiveLogic | getActionLogic (int pin) |
| Determines the action logic (ActiveLow or ActiveTouch) for the pin. | |
| virtual int | not_supported (int out, const char *msg="") |
| void | notifyAudioChange (AudioInfo info) |
| void | refillReadBuffer () |
| void | setupActions () |
| Setup the supported default actions. | |
Protected Attributes | |
| int | _timeout = 10 |
| AudioActions | actions |
| bool | active = true |
| AudioKitStreamConfig | cfg = defaultConfig(RXTX_MODE) |
| I2SStream | i2s_stream |
| AudioInfo | info |
| bool | is_notify_active = true |
| bool | is_started = false |
| AudioKit | kit |
| Vector< AudioInfoSupport * > | notify_vector |
| RingBuffer< uint8_t > | tmp_in {0} |
| RingBuffer< uint8_t > | tmp_out {0} |
| int | volume_value = 40 |
| int | write_buffer_size = MAX_SINGLE_CHARS |
AudioKit Stream which uses the https://github.com/pschatzmann/arduino-audiokit library.
|
inline |
Switch off the PA if the headphone in plugged in and switch it on again if the headphone is unplugged. This method complies with the.
|
inline |
Defines a new action that is executed when the indicated pin is active.
| pin | |
| action | |
| activeLogic | |
| ref |
Defines a new action that is executed when the indicated pin is active.
| pin | |
| action | |
| ref |
|
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.
|
inline |
Provides access to the AudioActions.
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in JupyterAudioT< T >, MozziStream, TimerCallbackAudioStream, EncodedAudioStream, PureDataStream, AdapterAudioOutputToAudioStream, GeneratedSoundStream< T >, GeneratedSoundStream< int16_t >, and InputMerge< 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, ResampleStream, and ResampleStreamT< TInterpolator >.
|
inlinevirtual |
We get the data via I2S - we expect to fill one buffer size.
Reimplemented from BaseStream.
Reimplemented from Print.
Reimplemented in AudioLoRa, UDPStream, VBANStream, AudioStreamWrapper, ConverterStream< T >, LoRaStream, EncodedAudioStream, FaustStream< DSP >, AudioFFTBase, I2SCodecStream, MiniAudioStream, StdioStream, A2DPStream, ESPNowStream, HammingFEC< bytecount, block_t >, AbstractURLStream, URLStreamESP32, ReedSolomonFEC< bytecount, additional_bytes >, AnalogAudioArduino, AnalogAudioStream, AudioEffectStreamT< T >, Equalizer3Bands, Equalizer3BandsPerChannel, I2SStream, ReformatBaseStream, TimedStream, MemoryStream, RingBufferStream, MeasuringStream, ProgressStream, Throttle, FilteredStream< T, TF >, FilteredStream< int16_t, int16_t >, ChannelFormatConverterStreamT< T >, ChannelFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, NumberFormatConverterStream, QueueStream< T >, QueueStream< uint8_t >, DynamicMemoryStream, FadeStream, FrequencyDetectorAutoCorrelation, FrequencyDetectorZeroCrossing, Pipeline, VolumeStream, AudioBLEClient, AudioBLEClient, AudioBLEServer, and AudioBLEServer.
|
inlineoverridevirtual |
Reimplemented from BaseStream.
|
inline |
Starts the processing.
Deletes all change notify subscriptions.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
|
inline |
|
inline |
Provides the default configuration.
|
inlineoverridevirtual |
Stops the processing.
Reimplemented from BaseStream.
Reimplemented from Print.
Reimplemented in PureDataStream, URLStreamBufferedT< T >, URLStreamBufferedT< ICYStream >, AudioStreamWrapper, ResampleStream, URLStream, BufferedTaskStream, I2SStream, MemoryStream, RingBufferStream, GeneratedSoundStream< T >, GeneratedSoundStream< int16_t >, and BufferedStream.
|
inlineprotected |
Determines the action logic (ActiveLow or ActiveTouch) for the pin.
|
inline |
Returns true if the headphone was detected.
|
inline |
Get the gpio number for adc detection.
|
inline |
Get the gpio number for auxin detection.
|
inline |
Get green led gpio number.
|
inline |
Get the mclk gpio number of es7243.
|
inline |
Get DSP reset gpio number.
|
inline |
Get the gpio number for headphone detection.
|
inline |
Get the number for mode-button.
|
inline |
Get number for play function.
|
inline |
Get the record-button id for adc-button.
|
inline |
Get number for set function.
|
inline |
Get the gpio number for PA enable.
|
inline |
Get DSP reset gpio number.
|
inline |
Get green led gpio number.
|
inline |
Get number for volume down function.
|
inline |
number for volume up function
|
inline |
Process input keys and pins.
Reads the audio data.
Reimplemented from AudioStream.
Source to generate silence: just sets the buffer to 0.
|
inlineprotectedinherited |
|
inlinevirtualinherited |
Removes a target in order not to be notified about audio changes.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
Update the audio info with new values: e.g. new sample_rate, bits_per_samples or channels.
Reimplemented from AudioStream.
Deactivate/Reactivate automatic AudioInfo updates: (default is active)
|
inlineprotected |
Setup the supported default actions.
|
inline |
Determines the volume.
Reimplemented from AudioStream.
Reimplemented in MemoryStream, AudioStreamWrapper, BufferedTaskStream, RingBufferStream, BufferedStream, and URLStream.
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protectedinherited |