ESP32 AudioSource for AudioPlayer using an the SPIFFS file system.
More...
#include <AudioSourceSPIFFS.h>
ESP32 AudioSource for AudioPlayer using an the SPIFFS file system.
- Note
- Supported only by Arduino platforms that support SPIFFS (e.g. ESP32)!
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ AudioSourceSPIFFS()
◆ ~AudioSourceSPIFFS()
◆ begin()
Reset actual stream and move to root.
Implements AudioSource.
◆ end()
◆ index()
Provides the current index position.
Reimplemented from AudioSource.
◆ isAutoNext()
| virtual bool isAutoNext |
( |
| ) |
|
|
inlinevirtual |
Returns default setting go to the next.
Reimplemented from AudioSource.
◆ nextStream()
| virtual Stream * nextStream |
( |
int |
offset = 1 | ) |
|
|
inlineoverridevirtual |
◆ operator[]()
| Stream * operator[] |
( |
int |
idx | ) |
|
|
inlineinherited |
◆ previousStream()
| virtual Stream * previousStream |
( |
int |
offset | ) |
|
|
inlinevirtualinherited |
◆ selectStream() [1/2]
| virtual Stream * selectStream |
( |
const char * |
path | ) |
|
|
inlineoverridevirtual |
Returns audio stream by path: The index is not changed!
Implements AudioSource.
◆ 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.
◆ setAutoNext()
| virtual void setAutoNext |
( |
bool |
flag | ) |
|
|
inlinevirtualinherited |
◆ setFileFilter()
| void setFileFilter |
( |
const char * |
filter | ) |
|
|
inline |
Defines the regex filter criteria for selecting files. E.g. ".*Bob
Dylan.*"
◆ setIndex()
| virtual Stream * setIndex |
( |
int |
index | ) |
|
|
inlinevirtualinherited |
same as selectStream - I just prefer this name
◆ setMetadataCallback()
◆ setPath()
| virtual void setPath |
( |
const char * |
p | ) |
|
|
inlinevirtual |
Allows to "correct" the start path if not defined in the constructor.
◆ setTimeout()
| virtual void setTimeout |
( |
int |
millisec | ) |
|
|
inlinevirtualinherited |
◆ setTimeoutAutoNext()
| virtual void setTimeoutAutoNext |
( |
int |
millisec | ) |
|
|
inlinevirtualinherited |
Sets the timeout which is triggering to move to the next stream. - the default value is 500 ms
◆ 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.
◆ timeoutAutoNext()
| virtual int timeoutAutoNext |
( |
| ) |
|
|
inlinevirtualinherited |
Provides the timeout which is triggering to move to the next stream.
◆ toStr()
provides the actual file name
Reimplemented from AudioSource.
◆ exension
| const char* exension = nullptr |
|
protected |
◆ file
◆ file_name
◆ file_name_pattern
| const char* file_name_pattern = "*" |
|
protected |
◆ idx
| SDDirect<fs::SPIFFSFS,fs::File> idx {SPIFFS} |
|
protected |
◆ idx_pos
◆ is_auto_next
◆ is_sd_setup
◆ start_path
| const char* start_path = nullptr |
|
protected |
◆ timeout_auto_next_value
| int timeout_auto_next_value = 500 |
|
protectedinherited |
The documentation for this class was generated from the following file: