File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ class AudioSourceSDFAT : public AudioSource {
8080 exension = ext;
8181 setup_index = setupIndex;
8282 is_sd_setup = true ;
83+ // since we expect an open fs we do not close it
84+ is_close_sd = false ;
8385 }
8486
8587 virtual ~AudioSourceSDFAT () {
@@ -102,8 +104,9 @@ class AudioSourceSDFAT : public AudioSource {
102104
103105 void end () {
104106 if (is_sd_setup) {
107+ TRACEI ();
105108#ifdef ESP32
106- sd.end ();
109+ if (is_close_sd) sd.end ();
107110#endif
108111 is_sd_setup = false ;
109112 }
@@ -177,6 +180,7 @@ class AudioSourceSDFAT : public AudioSource {
177180 bool setup_index = true ;
178181 bool owns_cfg = false ;
179182 bool is_sd_setup = false ;
183+ bool is_close_sd = true ;
180184
181185 const char *getFileName (AudioFile &file) {
182186 static char name[MAX_FILE_LEN];
You can’t perform that action at this time.
0 commit comments