|
arduino-audio-tools
|
Callback Audio Data Source which is used by the Audio Players. More...
#include <AudioSource.h>
Public Member Functions | |
| AudioSourceCallback () | |
| AudioSourceCallback (Stream *(*nextStreamCallback)(int offset), void(*onStartCallback)()=nullptr) | |
| virtual bool | begin () override |
| Reset actual stream and move to root. | |
| virtual const char * | getPath () |
| Returns the requested path: relevant when provided idx in callback is -1. | |
| virtual int | index () |
| Returns the actual index of the stream. | |
| virtual bool | isAutoNext () override |
| Returns default setting go to the next. | |
| virtual Stream * | nextStream (int offset) override |
| Stream * | operator[] (int idx) |
| access with array syntax | |
| virtual Stream * | previousStream (int offset) |
| Returns previous audio stream. | |
| virtual Stream * | selectStream (const char *path) override |
| Returns audio stream by path. | |
| virtual Stream * | selectStream (int index) override |
| Returns selected audio stream. | |
| virtual void | setAutoNext (bool a) |
| void | setCallbackNextStream (Stream *(*callback)(int offset)) |
| void | setCallbackOnStart (void(*callback)()) |
| void | setCallbackSelectStream (Stream *(*callback)(int idx)) |
| virtual Stream * | setIndex (int index) |
| same as selectStream - I just prefer this name | |
| virtual bool | setMetadataCallback (void(*fn)(MetaDataType info, const char *str, int len), ID3TypeSelection sel=SELECT_ICY) |
| virtual void | setTimeout (int millisec) |
| Sets the timeout of Stream in milliseconds. | |
| virtual void | setTimeoutAutoNext (int millisec) |
| virtual int | timeoutAutoNext () |
| Provides the timeout which is triggering to move to the next stream. | |
| virtual const char * | toStr () |
| provides the actual stream (e.g. file) name or url | |
Protected Attributes | |
| bool | auto_next = true |
| Stream *(* | indexStreamCallback )(int index) = nullptr |
| bool | is_auto_next = true |
| Stream *(* | nextStreamCallback )(int offset) = nullptr |
| void(* | onStartCallback )() = nullptr |
| const char * | path = nullptr |
| int | timeout_auto_next_value = 500 |
Callback Audio Data Source which is used by the Audio Players.
|
inline |
|
inline |
Reset actual stream and move to root.
Implements AudioSource.
Returns the requested path: relevant when provided idx in callback is -1.
Returns the actual index of the stream.
Reimplemented in AudioSourceIdxSD, AudioSourceIdxSDFAT< AudioFs, AudioFile >, AudioSourceIdxSDMMC, AudioSourceLittleFS, AudioSourceSD, AudioSourceSDFAT< AudioFs, AudioFile >, AudioSourceSDMMC, AudioSourceSPIFFS, AudioSourceSTD, AudioSourceURL, AudioSourceVFS, AudioSourceSDFAT< AudioFs, AudioFile >, AudioSourceVector< FileType >, AudioSourceArray< FileType >, and AudioSourceFTP< ClientType >.
Returns default setting go to the next.
Reimplemented from AudioSource.
Returns next (with positive index) or previous stream (with negative index)
Implements AudioSource.
Returns previous audio stream.
Reimplemented in AudioSourceFTP< ClientType >, and AudioSourceURL.
Returns audio stream by path.
Implements AudioSource.
Returns selected audio stream.
Reimplemented from AudioSource.
Reimplemented from AudioSource.
same as selectStream - I just prefer this name
|
inlinevirtualinherited |
Reimplemented in AudioSourceURL.
Sets the timeout of Stream in milliseconds.
Reimplemented in AudioSourceURL, and AudioSourceSDFAT< AudioFs, AudioFile >.
Sets the timeout which is triggering to move to the next stream. - the default value is 500 ms
Provides the timeout which is triggering to move to the next stream.
provides the actual stream (e.g. file) name or url
Reimplemented in AudioSourceIdxSD, AudioSourceIdxSDFAT< AudioFs, AudioFile >, AudioSourceIdxSDMMC, AudioSourceLittleFS, AudioSourceSD, AudioSourceSDFAT< AudioFs, AudioFile >, AudioSourceSDMMC, AudioSourceSPIFFS, AudioSourceSTD, AudioSourceURL, AudioSourceVFS, AudioSourceSDFAT< AudioFs, AudioFile >, AudioSourceVector< FileType >, AudioSourceArray< FileType >, and AudioSourceFTP< ClientType >.
|
protectedinherited |