7#include "AudioLogger.h"
14#define SPI_CLOCK SD_SCK_MHZ(50)
31template <
typename AudioFs = SdFat32,
typename AudioFile = File32>
36 int chipSelect =
PIN_CS,
int speedMHz = 10,
37 bool setupIndex =
true) {
39 LOGI(
"SD chipSelect: %d", chipSelect);
40 LOGI(
"SD speedMHz: %d", speedMHz);
42 p_cfg =
new SdSpiConfig(chipSelect, DEDICATED_SPI, SD_SCK_MHZ(speedMHz));
51 SdSpiConfig &config,
bool setupIndex =
true) {
61 AudioSourceIdxSDFAT(AudioFs fs,
const char *startFilePath=
"/",
const char *ext=
"",
bool setupIndex =
true){
80 LOGE(
"sd.begin failed");
102 LOGI(
"nextStream: %d", offset);
114 if (path ==
nullptr) {
115 LOGE(
"Filename is null")
120 if (!
file.open(path, O_RDONLY)) {
121 LOGE(
"Open error: '%s'", path);
124 LOGI(
"-> selectStream: %s", path);
150 return idx.indexOf(filename);
#define TRACED()
Definition AudioLoggerIDF.h:31
#define LOGI(...)
Definition AudioLoggerIDF.h:28
#define LOGE(...)
Definition AudioLoggerIDF.h:30
#define MAX_FILE_LEN
Definition SDDirect.h:6
#define PIN_CS
Definition avr.h:14