@@ -33,15 +33,15 @@ class AudioSourceIdxSD : public AudioSource {
3333 // / Default constructor
3434 AudioSourceIdxSD (const char *startFilePath = " /" , const char *ext = " .mp3" , int chipSelect = PIN_CS, bool setupIndex=true ) {
3535 start_path = startFilePath;
36- exension = ext;
36+ extension = ext;
3737 setup_index = setupIndex;
3838 p_spi = &SPI;
3939 cs = chipSelect;
4040 }
4141
4242#ifdef USE_SD_SUPPORTS_SPI
4343 // Pass your own spi instance, in case you need a dedicated one
44- AudioSourceSD (const char *startFilePath, const char *ext, int chipSelect, SPIClass &spiInstance, bool setupIndex=true ) {
44+ AudioSourceIdxSD (const char *startFilePath, const char *ext, int chipSelect, SPIClass &spiInstance, bool setupIndex=true ) {
4545 start_path = startFilePath;
4646 extension = ext;
4747 setup_index = setupIndex;
@@ -59,7 +59,7 @@ class AudioSourceIdxSD : public AudioSource {
5959 }
6060 is_sd_setup = true ;
6161 }
62- idx.begin (start_path, exension , file_name_pattern, setup_index);
62+ idx.begin (start_path, extension , file_name_pattern, setup_index);
6363 idx_pos = 0 ;
6464 }
6565
@@ -119,7 +119,7 @@ class AudioSourceIdxSD : public AudioSource {
119119 File file;
120120 size_t idx_pos = 0 ;
121121 const char *file_name;
122- const char *exension = nullptr ;
122+ const char *extension = nullptr ;
123123 const char *start_path = nullptr ;
124124 const char *file_name_pattern = " *" ;
125125 bool setup_index = true ;
@@ -133,7 +133,7 @@ class AudioSourceIdxSD : public AudioSource {
133133#else
134134 return SD.begin (cs);
135135#endif
136-
136+ }
137137};
138138
139139} // namespace audio_tools
0 commit comments