AudioSource using the standard C++ api. In order to make this work you need to configure and provide a VFS object!
More...
#include <AudioSourceVFS.h>
|
| AudioSourceVFS (const char *startFilePath="/", const char *ext="") |
| Default constructor w/o VFS.
|
|
| AudioSourceVFS (VFS &vfs, const char *startFilePath="/", const char *ext="") |
| Default constructor with VFS.
|
|
virtual void | begin () override |
| Reset actual stream and move to root.
|
|
virtual void | end () |
|
int | index () |
| Provides the current index position.
|
|
virtual bool | isAutoNext () |
| Returns default setting go to the next.
|
|
virtual Stream * | nextStream (int offset=1) override |
| Returns next audio stream.
|
|
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 audio stream at the indicated index (the index is zero based, so the first value is 0!)
|
|
void | setFileFilter (const char *filter) |
|
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 | setPath (const char *p) |
| Allows to "correct" the start path if not defined in the constructor.
|
|
virtual void | setTimeout (int millisec) |
| Sets the timeout of Stream in milliseconds.
|
|
virtual void | setTimeoutAutoNext (int millisec) |
| Sets the timeout which is triggering to move to the next stream. - the default value is 500 ms.
|
|
void | setVFS (VFS &vfs) |
| Assign the VFS: to be used before calling begin.
|
|
long | size () |
|
virtual int | timeoutAutoNext () |
| Provides the timeout which is triggering to move to the next stream.
|
|
const char * | toStr () |
| provides the actual file name
|
|
|
const char * | get (int idx) |
|
bool | isValidAudioFile (fs::directory_entry file) |
| checks if the file is a valid audio file
|
|
|
fs::directory_entry | entry |
|
const char * | exension = "" |
|
VFSFile | file |
|
const char * | file_name |
|
const char * | file_name_pattern = "*" |
|
size_t | idx_pos = 0 |
|
VFS * | p_vfs = nullptr |
|
const char * | start_path = "/" |
|
int | timeout_auto_next_value = 500 |
|
AudioSource using the standard C++ api. In order to make this work you need to configure and provide a VFS object!
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ begin()
Reset actual stream and move to root.
Implements AudioSource.
◆ isAutoNext()
virtual bool isAutoNext |
( |
| ) |
|
|
inlinevirtual |
Returns default setting go to the next.
Reimplemented from AudioSource.
◆ nextStream()
virtual Stream * nextStream |
( |
int |
offset = 1 | ) |
|
|
inlineoverridevirtual |
◆ previousStream()
virtual Stream * previousStream |
( |
int |
offset | ) |
|
|
inlinevirtualinherited |
◆ selectStream() [1/2]
virtual Stream * selectStream |
( |
const char * |
path | ) |
|
|
inlineoverridevirtual |
◆ selectStream() [2/2]
virtual Stream * selectStream |
( |
int |
index | ) |
|
|
inlineoverridevirtual |
Returns audio stream at the indicated index (the index is zero based, so the first value is 0!)
Reimplemented from AudioSource.
◆ setFileFilter()
void setFileFilter |
( |
const char * |
filter | ) |
|
|
inline |
Defines the regex filter criteria for selecting files. E.g. ".*Bob
Dylan.*"
◆ setTimeout()
virtual void setTimeout |
( |
int |
millisec | ) |
|
|
inlinevirtualinherited |
◆ size()
Provides the number of files (The max index is size()-1): WARNING this is very slow if you have a lot of files in many subdirectories
The documentation for this class was generated from the following file: