4#include "AudioLogger.h"
5#include "AudioTools/Disk/AudioSource.h"
6#include "AudioTools/Disk/SDDirect.h"
20 start_path = startFilePath;
28 while (!SPIFFS.begin()) {
29 LOGE(
"SPIFFS.begin failed");
37 idx.begin(start_path, exension, file_name_pattern);
48 LOGI(
"nextStream: %d", offset);
53 LOGI(
"selectStream: %d",
index);
55 file_name = idx[
index];
56 if (file_name==
nullptr)
return nullptr;
57 LOGI(
"Using file %s", file_name);
58 file = SPIFFS.open(file_name);
59 return file ? &file :
nullptr;
64 file = SPIFFS.open(path);
65 file_name = file.name();
66 LOGI(
"-> selectStream: %s", path);
67 return file ? &file :
nullptr;
78 const char *
toStr() {
return file_name; }
84 virtual void setPath(
const char *p) { start_path = p; }
93 const char *file_name;
94 const char *exension =
nullptr;
95 const char *start_path =
nullptr;
96 const char *file_name_pattern =
"*";
97 bool is_sd_setup =
false;