arduino-audio-tools
|
An AudioSource that uses the https://github.com/pschatzmann/TinyFTPClient library to retrieve files from a FTP Server. You need to provide an FTPClient object to the constructor and make sure that you open it before you access the files. The storage of the expanded file names is done on the heap, so in order to limit the requested memory we can limit the number of files. More...
#include <AudioSourceFTP.h>
Public Member Functions | |
AudioSourceFTP (FTPClient< ClientType > &client, const char *path, const char *ext, int files=0) | |
Default constructor: Provide the client class as template argument e.g. AudioSourceFTP<WiFiClient> source(client, path, ext);. | |
bool | addDirectory (const char *path) |
Adds all the files of a directory. | |
void | begin () override |
Resets the actual data. | |
void | end () |
Resets the actual data. | |
int | index () override |
Retrieves all files and returns the actual index of the stream. | |
virtual bool | isAutoNext () |
Returns default setting go to the next. | |
Stream * | nextStream (int offset) override |
Returns next audio stream. | |
Stream * | operator[] (int idx) |
access with array syntax | |
Stream * | previousStream (int offset) override |
Returns previous audio stream. | |
Stream * | selectStream (const char *path) override |
Returns the FTPFile for the indicated path. | |
Stream * | selectStream (int index) override |
virtual Stream * | setIndex (int index) |
same as selectStream - I just prefer this name | |
void | setMaxFiles (int maxCount) |
Defines the max number of files (if value is >0) | |
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) |
size_t | size () |
Returns the number of available files. | |
virtual int | timeoutAutoNext () |
Provides the timeout which is triggering to move to the next stream. | |
const char * | toStr () override |
provides the actual stream (e.g. file) name or url | |
Protected Member Functions | |
void | addFiles (FTPFile &dir, int level) |
Adds all files recursively. | |
bool | endsWith (const char *file, const char *ext) |
bool | isValidIdx (int index) |
An AudioSource that uses the https://github.com/pschatzmann/TinyFTPClient library to retrieve files from a FTP Server. You need to provide an FTPClient object to the constructor and make sure that you open it before you access the files. The storage of the expanded file names is done on the heap, so in order to limit the requested memory we can limit the number of files.
|
inlineoverridevirtual |
Resets the actual data.
Implements AudioSource.
|
inlineoverridevirtual |
Retrieves all files and returns the actual index of the stream.
Reimplemented from AudioSource.
|
inlinevirtualinherited |
Returns default setting go to the next.
Reimplemented in AudioSourceIdxSD, AudioSourceIdxSDFAT, AudioSourceIdxSDMMC, AudioSourceLittleFS, AudioSourceSD, AudioSourceSDFAT, AudioSourceSDMMC, AudioSourceSPIFFS, AudioSourceSTD, AudioSourceURL, AudioSourceVFS, AudioSourceSDFAT, and AudioSourceCallback.
|
inlineoverridevirtual |
Returns next audio stream.
Implements AudioSource.
|
inlineoverridevirtual |
Returns previous audio stream.
Reimplemented from AudioSource.
|
inlineoverridevirtual |
Returns the FTPFile for the indicated path.
Implements AudioSource.
|
inlineoverridevirtual |
Returns audio stream at the indicated index (the index is zero based, so the first value is 0!)
Reimplemented from AudioSource.
|
inlinevirtualinherited |
Sets the timeout of Stream in milliseconds.
Reimplemented in AudioSourceURL, and AudioSourceSDFAT.
|
inlinevirtualinherited |
Sets the timeout which is triggering to move to the next stream. - the default value is 500 ms
|
inlineoverridevirtual |
provides the actual stream (e.g. file) name or url
Reimplemented from AudioSource.